个人测试空间 Mock 专用
This ObjC package is automatically generated by the Swagger Codegen project:
- API version: last
- Package version:
- Build package: io.swagger.codegen.languages.ObjcClientCodegen
The SDK requires ARC (Automatic Reference Counting) to be enabled in the Xcode project.
Install from Github using CocoaPods
Add the following to the Podfile:
pod 'SwaggerClient', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.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/SwaggerClient) and then add the following to the Podfile:
pod 'SwaggerClient', :path => 'Vendor/SwaggerClient'
Import the following:
#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGEmptyObject.h>
#import <SwaggerClient/SWGInlineResponse200.h>
#import <SwaggerClient/SWGInlineResponse200TestParam2.h>
// load API classes for accessing endpoints
#import <SwaggerClient/SWGApi.h>
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.
Please follow the installation procedure and then run the following:
NSString* *param1 = @"param1_example"; // testing params
SWGApi *apiInstance = [[SWGApi alloc] init];
// test_mock_1_basic
[apiInstance mockGetWithParam1:param1
completionHandler: ^(SWGInlineResponse200* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
All URIs are relative to http://localhost/samuel_test
Class | Method | HTTP request | Description |
---|---|---|---|
SWGApi | mockGet | GET /mock | test_mock_1_basic |
SWGApi | mockWithMockjsGet | GET /mock/with/mockjs | test_mock_2_mockjs |
All endpoints do not require authorization.