Latest 0.1.19
Homepage https://github.com/greengrowapps/GGRest
License Apache License, Version 2.0
Platforms ios 7.0, requires ARC
Authors

CI Status
codecov.io
Version
License
Platform

Usage

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

Example

This example gets the content of the url using basic http auth and deserializes the content as an object:


    GGWs *ws=[[GGWs alloc] init];
    [email protected]"https://api.github.com/repos/greengrowapps/GGRest/commits";
    ws.method=GET;
    ws.authentication=[[GGHttpBasicAuth alloc] initWithUsername:@"YOUR_GITHUB_USER" andPassword:@"YOUR_GITHUB_PASSWD"];

    ws.onOkArray=^(NSArray *commitsList ,GGGitCommit *nill ){
        for(GGGitCommit *c in commitsList){
          NSLog(@"Commit: %@",c);
        }
    };

    ws.onError=^(GGHttpResponse *response,NSError *error){
         NSLog(@"Unknown error");
    };

    [ws onResponse:404 objectCallBack:^(GGHttpResponse *res){
        NSLog(@"Repo not found");
    }];

    [ws onResponse:401 objectCallBack:^(GGHttpResponse *res){
        NSLog(@"Invalid credentials");
    }];

    [ws execute];

Installation

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

pod "GGRest"

License

GGRest is available under the Apache License Version 2.0. See the LICENSE file for more info.

Latest podspec

{
    "name": "GGRest",
    "version": "0.1.19",
    "summary": "A small iOs library to make easy connect to a REST webservice",
    "description": "A small iOs library to make easy connect to a REST webservice , experimental use only",
    "homepage": "https://github.com/greengrowapps/GGRest",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Adri": "[email protected]"
    },
    "source": {
        "git": "https://github.com/greengrowapps/GGRest.git",
        "tag": "0.1.19"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "GGRest": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This