SwaggerClient

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

  • API version: 2.1.0
  • Package version:
  • Build date: 2016-06-25T14:20:06.598Z
  • Build package: class io.swagger.codegen.languages.ObjcClientCodegen

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 <span class="hljs-string">'SwaggerClient'</span>, <span class="hljs-symbol">:git</span> =&gt; <span class="hljs-string">'https://github.com//.git'</span>

To specify a particular branch, append

, :branch =&gt; 'branch-name-here'

To specify a particular commit, append

, :commit =&gt; '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 <span class="hljs-string">'SwaggerClient'</span>, <span class="hljs-symbol">:path</span> =&gt; <span class="hljs-string">'Vendor/SwaggerClient'</span>

Usage

Import the following:


<span class="hljs-preprocessor">#import <span class="hljs-title">&lt;SwaggerClient/SWGApiClient.h&gt;</span></span>
<span class="hljs-preprocessor">#import <span class="hljs-title">&lt;SwaggerClient/SWGConfiguration.h&gt;</span></span>
<span class="hljs-comment">// load models</span>
<span class="hljs-preprocessor">#import <span class="hljs-title">&lt;SwaggerClient/SWGInlineResponse200.h&gt;</span></span>
<span class="hljs-comment">// load API classes for accessing endpoints</span>
<span class="hljs-preprocessor">#import <span class="hljs-title">&lt;SwaggerClient/SWGDefaultApi.h&gt;</span></span>

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:


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

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: ^(<span class="hljs-built_in">NSArray</span>&lt;SWGInlineResponse200&gt;* output, <span class="hljs-built_in">NSError</span>* error)) {
                            <span class="hljs-keyword">if</span> (output) {
                                <span class="hljs-built_in">NSLog</span>(<span class="hljs-string">@"%@"</span>, output);
                            }
                            <span class="hljs-keyword">if</span> (error) {
                                <span class="hljs-built_in">NSLog</span>(<span class="hljs-string">@"Error: %@"</span>, 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