Latest 0.0.1
Homepage https://github.com/alexfedosov/AFZalandoSDK
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking
Authors

IMPORTANT

Work in progress. If you want, please use it just for fun

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Request list of articles. You can specify query fields and filters:

AFZRequestArticlesList *articleListRequest = [AFZRequestArticlesList new];
articleListRequest.filterByActivationDate = @[kAFZArticleActivationDateThisWeek, kAFZArticleActivationDateLastWeek];
articleListRequest.queryFields = @[@"name"];

[articleListRequest performRequestWithCompletion:^(id  _Nullable result, NSError * _Nullable error) {

}];

Request article by ID

NSString *exampleArticleID = @"BE824G002-C11";
AFZRequestArticleById *articleRequest = [[AFZRequestArticleById alloc] initWithArticleId:exampleArticleID];

[articleRequest performRequestWithCompletion:^(id  _Nullable result, NSError * _Nullable error) {

}];

Request related information such as reviews and media

NSString *exampleArticleID = @"BE824G002-C11";
AFZRequestArticleById *articleRequest = [[AFZRequestArticleById alloc] initWithArticleId:exampleArticleID];

[[articleRequest requestRelatedReviews] performRequestWithCompletion:^(id  _Nullable result, NSError * _Nullable error) {

}];

[[articleRequest requestRelatedMedia] performRequestWithCompletion:^(id  _Nullable result, NSError * _Nullable error) {

}];

Cancel requests when needed

[[[AFZApiClient defaultApi] requestScheduler] cancelRequest:articleRequest];
// or
[[[AFZApiClient defaultApi] requestScheduler] cancelAllRequests];

Requirements

Installation

AFZalandoSDK is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AFZalandoSDK"

Author

Alexander Fedosov, [email protected]

License

AFZalandoSDK is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AFZalandoSDK",
    "version": "0.0.1",
    "summary": "iOS SDK for Zalando public API",
    "homepage": "https://github.com/alexfedosov/AFZalandoSDK",
    "license": "MIT",
    "authors": {
        "Alexander Fedosov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/alexfedosov/AFZalandoSDK.git",
        "tag": "0.0.1"
    },
    "social_media_url": "https://twitter.com/alexfedosov",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "AFZalandoSDK": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/**/*.h",
    "dependencies": {
        "AFNetworking": [
            "~> 2.6.3"
        ]
    }
}

Pin It on Pinterest

Share This