Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdoky/stinetwork
https://github.com/cdoky/stinetwork
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cdoky/stinetwork
- Owner: cdoky
- Created: 2015-11-16T15:35:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-12T09:55:40.000Z (about 8 years ago)
- Last Synced: 2024-10-31T15:49:46.021Z (2 months ago)
- Language: Objective-C
- Size: 19.6 MB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# STINetwork
用过Bee-framework和samurai-native的人都知道,这个框架里面最好用的就是其中的网络框架,好处有以下几点
1.自动生成model代码,并且非常简洁
2.自动生成api接口调用代码,你要做的只是填充请求数据
3.请求的数据,自动反序列化成相对应的mode实例使用方法如下
LIST_SHOTS_API * api = [LIST_SHOTS_API new];
api.req.page = 1;
api.req.per_page = 18;
api.req.list = @"popular";
api.whenUpdated = ^( LIST_SHOTS_RESPONSE * resp, id error ) {
if ( resp )
{
//request success
NSArray *shots = resp.data;
//todo something
}
else
{
//request faild
}
};
[api send];由于这两个框架本身比较重,所以从中分离出其中的网络框架出来单独使用,有需要的可以支持一下。
最后感谢qfish大神的支持,后续我会跟qfish大神联系,把最新的代码生成工具放出来
有问题可以通过邮件联系我:[email protected]
#use CocoaPods
pod 'STINetwork'