swagger_client

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

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

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github


pip install git+https://github.com//.git

(you may need to run

pip

with root permission:

sudo pip install git+https://github.com//.git

)

Then import the package:


<span class="hljs-keyword">import</span> swagger_client

Setuptools

Install via Setuptools.


python setup.py install --user

(or

sudo python setup.py install

to install the package for all users)

Then import the package:


<span class="hljs-keyword">import</span> swagger_client

Getting Started

Please follow the installation procedure and then run the following:


<span class="hljs-keyword">import</span> time
<span class="hljs-keyword">import</span> swagger_client
<span class="hljs-keyword">from</span> swagger_client.rest <span class="hljs-keyword">import</span> ApiException
<span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint
<span class="hljs-comment"># create an instance of the API class</span>
api_instance = swagger_client.DefaultApi
rpt_type = <span class="hljs-number">1.2</span> <span class="hljs-comment"># float | Report type. (0 report, 1 widget, 2 chart).</span>
rpt_id = <span class="hljs-number">1.2</span> <span class="hljs-comment"># float | Report id.</span>
start = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Start offset. (optional)</span>
limit = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Number of results to return. Max 10K. (optional)</span>
sort_by = <span class="hljs-string">'sort_by_example'</span> <span class="hljs-comment"># str | Sort column. (optional)</span>
sort_type = <span class="hljs-string">'sort_type_example'</span> <span class="hljs-comment"># str | Sort mode asc/desc. (optional)</span>
from_date = <span class="hljs-string">'from_date_example'</span> <span class="hljs-comment"># str | Start date time. (optional)</span>
to_date = <span class="hljs-string">'to_date_example'</span> <span class="hljs-comment"># str | End date time. (optional)</span>
duration = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Duration range. (optional)</span>
phone = <span class="hljs-string">'phone_example'</span> <span class="hljs-comment"># str | List of caller phone. (optional)</span>
phone1 = <span class="hljs-string">'phone1_example'</span> <span class="hljs-comment"># str | List of dialled phones. (optional)</span>
co = <span class="hljs-string">'co_example'</span> <span class="hljs-comment"># str | List of trunk/co. (optional)</span>
ext = <span class="hljs-string">'ext_example'</span> <span class="hljs-comment"># str | list of extensions. (optional)</span>
pbx_id = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | list of PBX Ids. (optional)</span>
call_source = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | list of callsource. (optional)</span>
call_type = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | list of call type signatures.(5 Unanswered Calls, 7 Transfered Calls, 8 Forwarded Calls) (optional)</span>
direction = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | list of direction.(0 incoming, 1 outgoing, 2 internal) (optional)</span>
caller_name = <span class="hljs-string">'caller_name_example'</span> <span class="hljs-comment"># str | list of caller name. (optional)</span>
did = <span class="hljs-string">'did_example'</span> <span class="hljs-comment"># str | list of did. (optional)</span>
dnis = <span class="hljs-string">'dnis_example'</span> <span class="hljs-comment"># str | list of dnis. (optional)</span>
acc = <span class="hljs-string">'acc_example'</span> <span class="hljs-comment"># str | list of account code. (optional)</span>
ring = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Ring range.Seconds unit. (optional)</span>
cost = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Cost range. (optional)</span>
group = <span class="hljs-number">3.4</span> <span class="hljs-comment"># float | Department/Group id. (optional)</span>

<span class="hljs-keyword">try</span>:
    api_response = api_instance.calls_get(rpt_type, rpt_id, start=start, limit=limit, sort_by=sort_by, sort_type=sort_type, from_date=from_date, to_date=to_date, duration=duration, phone=phone, phone1=phone1, co=co, ext=ext, pbx_id=pbx_id, call_source=call_source, call_type=call_type, direction=direction, caller_name=caller_name, did=did, dnis=dnis, acc=acc, ring=ring, cost=cost, group=group)
    pprint(api_response)
<span class="hljs-keyword">except</span> ApiException <span class="hljs-keyword">as</span> e:
    <span class="hljs-keyword">print</span> <span class="hljs-string">"Exception when calling DefaultApi-&gt;calls_get: %s\n"</span> % e

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
DefaultApicalls_getGET /Calls
DefaultApifeatures_charts_getGET /Features/charts
DefaultApifeatures_reports_getGET /Features/reports
DefaultApifeatures_widget_getGET /Features/widget



Download Python Sample Code