8000 GitHub - indix/indix-api-objective-c: Indix api client for objective c
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

indix/indix-api-objective-c

Repository files navigation

Indix API Objective-C Client

This is an API client library for the Indix API written in Objective-C. For detailed documentation, please visit the Indix Developer Portal.

Installation

You can install this client using Cocoapods

pod 'indix-api'

Usage

First initialize IndixApiClient, you can do this in your AppDelegate

[IndixApiClient setIndixAppId:@"YOUR_INDIX_APP_ID" appKey:@"YOUR_INDIX_APP_KEY"];

Visit [developer.indix.com](the Indix developer portal) to get your own App ID and Key.

Search for Brands, Stores or Categories

Brands

[IndixApiClient getBrands:@{ @"q":@"nike"} success:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

Stores

[IndixApiClient getStores:@{ @"q":@"Amazon.com"} success:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

Categories

Note: This endpoint downloads all categories. This is not a search end point.

[IndixApiClient getCategories:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

Search suggestions

[IndixApiClient getSearchSuggestions:@{ @"q":@"red", @"countryCode":@"US" } success:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

Search for products

[IndixApiClient getProductSummary:@{ @"q":@"nike", @"countryCode":@"US" } success:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];    

List of all methods, each of which will return different types of product information.

[IndixApiClient getProductSummary];
[IndixApiClient getProductOffersStandard];
[IndixApiClient getProductOffersPremium];
[IndixApiClient getProductCatalogStandard];
[IndixApiClient getProductCatalogPremium];
[IndixApiClient getProductUniversal];

Lookup a specific product

[IndixApiClient getProductLookupSummary:@{ @"mpid":@"nike", @"8e1d8cd338ada38624d2f9322b259402":@"US" } success:^(id responseObject) {
        NSLog(@"%@", responseObject);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }]; 

List of all methods, each of which will return different types of product information.

[IndixApiClient getProductLookupSummary];
[IndixApiClient getProductLookupOffersStandard];
[IndixApiClient getProductLookupOffersPremium];
[IndixApiClient getProductLookupCatalogStandard];
[IndixApiClient getProductLookupCatalogPremium];
[IndixApiClient getProductLookupUniversal];

Parsing the response

This library comes a utility class that converts response from server to concrete class that can be consumed. You can use IXRApiV2Parser to do parsing.

[IndixApiClient getProductSummary:@{ @"q":@"nike", @"countryCode":@"US" } success:^(id responseObject) {
		NSArray *parsedArray = [IXRApiV2Parser parseProductArrayFromSearchDictionary:responseObject];
        NSLog(@"%@", parsedArray);
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];    

Note

This library only supports real-time API from Indix.com, if you are interested in bulk-api you can contact us at support@indix.com.

About

Indix api client for objective c

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0