Skip to content
iOS SDK for Zalando public API
Objective-C Shell Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Pod
.gitignore
.travis.yml
AFZalandoSDK.podspec
LICENSE
README.md
_Pods.xcodeproj

README.md

AFZalandoSDK

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, alexander.a.fedosov@gmail.com

License

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

You can’t perform that action at this time.