Latest 0.0.1
Homepage https://github.com/GetResponse/iOS-Developer-Kit
License MIT
Platforms ios 8.2, requires ARC
Dependencies AFNetworking, JSONModel, AFNetworkActivityLogger
Authors

GetResponseAPI iOS SDK

CocoaPods license Platform

GetResponseAPI is an API wrapper for the GetResponse API 3.0 that allows you to use basic API methods such as listning, adding, and removing contacts as well as fetching the list of your campaigns.

Requirements

To use the library you need to have an active GetResponse account with assosicated Developer API Key.

This library is using CocoaPods to maintain library dependencies.
We use AFNetworking for the communication layer and JSONModel for modeling the response objects.

Installation

  1. Add pod 'GetResponseAPI' to your Podfile
  2. Run pod install
  3. Add #import "GRApi.h" from your bridging header, prefix header, or wherever you want to use the library

Setup

First, set an API key:

[[GRApi sharedInstance] setupWithApiKey:DEVELOPER_API_KEY];

From now on, you can use the shared instance of the GRApi object in your project to make API calls.

The API comes with following set of helper methods:

[[GRApi sharedInstance] setVerbose:(BOOL)]; //Enable logging
[[GRApi sharedInstance] setResultsPerPage:(NSNumber]; //Self-explanatory

The setVerbose method will enable the underlying AFNetworkActivityLogger library in debug mode.

Example usage

Getting contact

[[GRApi sharedInstance] getContactByEmail:@"[email protected]" inCampaign:@"existing_campaign_name" completion:^(GRContact *contact, NSError *error) {
        if (!error) {
            NSLog(@"Got contact with name: %@ for email %@", contact.name, contact.email);
            //Do anything you want with the GRContact model.
        }
    }];

Getting list of contacts

Some of the methods come with the paging mechanism that is returning a totalPages parameter after the first call. You can set the number of results per page as described in sections above.

[[GRApi sharedInstance] getContactsWithPageNumber:nil completion:^(NSArray *contactsArray, NSNumber *totalPages, NSError *error) {
        if (!error) {
            NSLog(@"Got %li contacts. Total pages: %i", contactsArray.count, totalPages.intValue);
            //Do anything you want with contactsArray that consists of GRContact models
        }
    }];

Samples

API Methods Samples

You can inspect a set of examples that are included in the Samples directory.

Example Application

We’ve attached a sample application called ApiWrapper that utilizes almost every method created in the API wrapper so far and we strongly reccomends you to take a look.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add your changes & test them.
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Testing

This library is using a series of unit tests to ensure it is working properly.
For more information about testing, see the Testing page in our wiki.

License

See LICENSE.TXT

Latest podspec

{
    "name": "GetResponseAPI",
    "version": "0.0.1",
    "summary": "This library is an API wrapper for the GetResponse API v3.0",
    "description": "GetResponseAPI is an API wrapper for the GetResponse API 3.0 that allows you to use basic API methods such as listning, adding, and removing contacts as well as fetching the list of your campaigns.",
    "authors": {
        "Maciej Kou0142ek": "[email protected]"
    },
    "homepage": "https://github.com/GetResponse/iOS-Developer-Kit",
    "license": {
        "type": "MIT",
        "file": "LICENSE.TXT"
    },
    "platforms": {
        "ios": "8.2"
    },
    "source": {
        "git": "https://github.com/GetResponse/iOS-Developer-Kit.git",
        "tag": "v0.0.1"
    },
    "source_files": [
        "GetResponseAPI",
        "GetResponseAPI/**/*.{h,m}"
    ],
    "resource_bundles": {
        "GetResponseAPI": []
    },
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "~> 2.0"
        ],
        "JSONModel": [
            "~> 1.0"
        ],
        "AFNetworkActivityLogger": []
    }
}

Pin It on Pinterest

Share This