SwaggerClient

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

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 'SwaggerClient', :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/SwaggerClient) and then add the following to the Podfile:

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

Usage

Import the following:

#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGConfiguration.h>
// load models
#import <SwaggerClient/SWGInlineResponse200.h>
// load API classes for accessing endpoints
#import <SwaggerClient/SWGDefaultApi.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:



NSNumber* *rptType = @1.2; // Report type. (0 report, 1 widget, 2 chart).
NSNumber* *rptId = @1.2; // Report id.
NSNumber* *start = @3.4; // Start offset. (optional)
NSNumber* *limit = @3.4; // Number of results to return. Max 10K. (optional)
NSString* *sortBy = @"sortBy_example"; // Sort column. (optional)
NSString* *sortType = @"sortType_example"; // Sort mode asc/desc. (optional)
NSString* *fromDate = @"fromDate_example"; // Start date time. (optional)
NSString* *toDate = @"toDate_example"; // End date time. (optional)
NSNumber* *duration = @3.4; // Duration range. (optional)
NSString* *phone = @"phone_example"; // List of caller phone. (optional)
NSString* *phone1 = @"phone1_example"; // List of dialled phones. (optional)
NSString* *co = @"co_example"; // List of trunk/co. (optional)
NSString* *ext = @"ext_example"; // list of extensions. (optional)
NSNumber* *pbxId = @3.4; // list of PBX Ids. (optional)
NSNumber* *callSource = @3.4; // list of callsource. (optional)
NSNumber* *callType = @3.4; // list of call type signatures.(5 Unanswered Calls, 7 Transfered Calls, 8 Forwarded Calls) (optional)
NSNumber* *direction = @3.4; // list of direction.(0 incoming, 1 outgoing, 2 internal) (optional)
NSString* *callerName = @"callerName_example"; // list of caller name. (optional)
NSString* *did = @"did_example"; // list of did. (optional)
NSString* *dnis = @"dnis_example"; // list of dnis. (optional)
NSString* *acc = @"acc_example"; // list of account code. (optional)
NSNumber* *ring = @3.4; // Ring range.Seconds unit. (optional)
NSNumber* *cost = @3.4; // Cost range. (optional)
NSNumber* *group = @3.4; // Department/Group id. (optional)

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

[apiInstance callsGetWithRptType:rptType
    rptId:rptId
    start:start
    limit:limit
    sortBy:sortBy
    sortType:sortType
    fromDate:fromDate
    toDate:toDate
    duration:duration
    phone:phone
    phone1:phone1
    co:co
    ext:ext
    pbxId:pbxId
    callSource:callSource
    callType:callType
    direction:direction
    callerName:callerName
    did:did
    dnis:dnis
    acc:acc
    ring:ring
    cost:cost
    group:group
              completionHandler: ^(NSArray<SWGInlineResponse200>* output, NSError* error)) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

Documentation for API Endpoints

All URIs are relative to https://api.pbxdom.com

ClassMethodHTTP requestDescription
SWGDefaultApicallsGetGET /Calls 
SWGDefaultApifeaturesChartsGetGET /Features/charts 
SWGDefaultApifeaturesReportsGetGET /Features/reports 
SWGDefaultApifeaturesWidgetGetGET /Features/widget 

Download Objective C Sample Code