Skip to content

Instantly share code, notes, and snippets.

@toshihirock
Created November 24, 2016 12:45
Show Gist options
  • Save toshihirock/7d83cb8dcf1821ac9ead355a75b33fad to your computer and use it in GitHub Desktop.
Save toshihirock/7d83cb8dcf1821ac9ead355a75b33fad to your computer and use it in GitHub Desktop.

This ObjC package is automatically generated by the Swagger Codegen project:

  • API version:
  • Package version:
  • Build date:
  • Build package:

Requirements

The SDK requires ARC (Automatic Reference Counting) to be enabled in the Xcode project.

Installation & Usage

Install from Github using CocoaPods

Add the following to the Podfile:

pod '', :git => 'https://github.com//.git'

To specify a particular branch, append , :branch => 'branch-name-here'

To specify a particular commit, append , :commit => '11aa22'

Install from local path using CocoaPods

Put the SDK under your project folder (e.g. /path/to/objc_project/Vendor/) and then add the following to the Podfile:

pod '', :path => 'Vendor/'

Usage

Import the following:

#import </ApiClient.h>
#import </Configuration.h>
// load models
#import </CLIWeather.h>
#import </CLIWeather_coord.h>
#import </CLIWeather_main.h>
#import </CLIEmpty.h>
#import </CLIWeather_wind.h>
#import </CLIWeather_clouds.h>
#import </CLIWeather_weather_item.h>
#import </CLIWeather_sys.h>
// load API classes for accessing endpoints
#import </CLIWeatherAPIClient.h>

Recommendation

It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issue.

Getting Started

Please follow the installation procedure and then run the following:

CLIWeatherAPIClient *apiInstance = [[CLIWeatherAPIClient alloc] init];

[apiInstance rootGetWithCompletionHandler: 
              ^(CLIEmpty * output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

Documentation for API Endpoints

All URIs are relative to https://bs70x818lf.execute-api.ap-northeast-1.amazonaws.com/prod

Class Method HTTP request Description
CLIWeatherAPIClient rootGet GET /
CLIWeatherAPIClient weatherGet GET /weather

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment