Latest 0.0.8
Homepage https://github.com/i-phil/STINetwork
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Dependencies AFNetworking
Frameworks Foundation
Authors

用过Bee-frameworksamurai-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<SHOT> *shots = resp.data;
        //todo something
    }
    else
    {
        //request faild
    }
};

[api send];

由于这两个框架本身比较重,所以从中分离出其中的网络框架出来单独使用,有需要的可以支持一下。

最后感谢qfish大神的支持,后续我会跟qfish大神联系,把最新的代码生成工具放出来

@QFish

有问题可以通过邮件联系我:[email protected]

use CocoaPods

pod 'STINetwork'

Latest podspec

{
    "name": "STINetwork",
    "version": "0.0.8",
    "summary": "1.u81eau52a8u751fu6210modelu4ee3u7801uff0cu5e76u4e14u975eu5e38u7b80u6d01n2.u81eau52a8u751fu6210apiu63a5u53e3u8c03u7528u4ee3u7801uff0cu4f60u8981u505au7684u53eau662fu586bu5145u8bf7u6c42u6570u636e n3.u8bf7u6c42u7684u6570u636euff0cu81eau52a8u53cdu5e8fu5217u5316u6210u76f8u5bf9u5e94u7684modeu5b9eu4f8b",
    "description": "STINetwork",
    "homepage": "https://github.com/i-phil/STINetwork",
    "license": "MIT",
    "authors": {
        "philZhang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/i-phil/STINetwork.git",
        "tag": "0.0.8",
        "submodules": true
    },
    "frameworks": "Foundation",
    "requires_arc": true,
    "source_files": "STINetwork/STINetworkHeader.{h,m}",
    "dependencies": {
        "AFNetworking": []
    },
    "public_header_files": "STINetwork/STINetworkHeader.h",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "prefix_header_contents": "",
    "subspecs": [
        {
            "name": "Singleton",
            "public_header_files": "STINetwork/Samurai_Singleton.h",
            "source_files": "STINetwork/Samurai_Singleton.{h,m}"
        },
        {
            "name": "AutoCoding",
            "source_files": "STINetwork/http/vendor/AutoCoding/**/*.{h,m}",
            "public_header_files": "STINetwork/http/vendor/AutoCoding/**/*.h"
        },
        {
            "name": "Http",
            "dependencies": {
                "STINetwork/AutoCoding": [],
                "STINetwork/Singleton": []
            },
            "source_files": "STINetwork/http/STIHTTPNetwork/**/*.{h,m}",
            "public_header_files": "STINetwork/http/STIHTTPNetwork/**/*.h"
        }
    ]
}

Pin It on Pinterest

Share This