ATNetworking 1.0.1

ATNetworking 1.0.1

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2016年5月

William Locke维护。



  • 作者:
  • williamlocke

使用

#import "ATNetworking.h"

查询 API。


    [[ATNetworking sharedInstance] requestURL:@"https://www.googleapis.com/books/v1/volumes?q=harry+potter" completionHandler:^(NSDictionary *item, NSArray *items, NSError *error, NSDictionary *errorDictionary, NSURLResponse *response, NSDictionary *data) {

        if(!error){
            // Populates 'items' on API responses that contain list of objects.
            // Populates 'item' on API responses that contain a single object.

        }else{
            NSLog(@"An error occurr: %@", error.userInfo[NSLocalizedDescriptionKey]);

        }

    }];

测试

在 Xcode 中打开项目/ATNetworking.xcworkspace,然后按 Command-U