Skip to content

Commit

Permalink
Minor changes Done
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsharique committed Jun 22, 2017
1 parent 5a647c5 commit 2e488cd
Show file tree
Hide file tree
Showing 80 changed files with 361 additions and 234 deletions.
331 changes: 173 additions & 158 deletions .idea/workspace.xml

Large diffs are not rendered by default.

57 changes: 56 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,57 @@
# restcomm-sdk-python
The Python SDK for the RestComm REST API

Restcomm_Python_SDk is a module for using the *Restcomm Rest API*. The Restcomm REST API allows you to query meta-data about your account, phone numbers, calls, text messages, and recordings. You can also do some communications control like initiate outbound calls and send text messages

# Installation

Install from PyPi using *pip*, a package manager for Python. Go to the terminal and type:

`$ pip install Restcomm_Python_SDk`

if it doesn’t work, try using:

`$ sudo pip install Restcomm_Python_SDk`

Don’t have pip installed? Try installing it, by running this from the command line:

`$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python`

Or, you can *download the source code (ZIP)* for Restcomm-Python, and then run in the terminal:

`$ python setup.py install`

Or, you can run it by using:

`$ sudo python setup.py install`

if you want to install it in *python 3* or above, try using:

`$ sudo python3 setup.py install`

# Usage

Simply import *Restcomm_Python_SDk* to use it

# Feedback

Report any feedback or problems with this Release Candidate to the *_Github Issues_* for restcomm-sdk-python

# Running Tests

To run the tests, you need to enter all your credentials like Account Sid, Authentication token etc in the text file. Each module has its own text file. you can run each module test individually or can use *nose* to run it together through terminal

# Python Version

Python 3 and above are supported

# Dependencies

This project needs *requests* module and *vcrpy* module to be installed. vcrpy module is only needed for testing

# Download Instruction

you can download Restcomm Python SDk from: https://github.com/RestComm/restcomm-sdk-python
you can refer the Documentation at: http://pythonhosted.org/Restcomm_Python_SDk/
you can also refer Restcomm Documentation at: http://documentation.telestax.com/


4 changes: 0 additions & 4 deletions README.rst

This file was deleted.

21 changes: 21 additions & 0 deletions Restcomm_Python_SDk/Examples/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
HOW TO USE EXAMPLE FILE!

1: To run Examples, you need to first install requests module.
$ pip install requests, or
$ sudo pip install requests

2: Now, open the Terminal
3: Go to the folder containing Basic_Usage.py. For example, for me its,
$ cd/restcomm-sdk-python/Restcomm_Python_SDk/Examples

4: Now run the Basic_Usage.py script in the terminal
$ python ./Basic_Usage.py

5: Now Enter the Basic Authentication as asked in the terminal. For Example,
$ Account Sid: "XXXXXXXXXXXXXXXXXXXXXXX"
$ Authentication Token: "YYYYYYYYYYYYYYYYYYYYYY"
$ Base Url: "https://cloud.restcomm.com/restcomm/2012-04-24"

6: It will return the Account Details.
7: You can run it further by providing more data's
8: The code will run line by line according to the functions. Please check the code to know which function is executing
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def Details(self):
return "Base Url is Incorrect! Please verify and try again"
else:
content = json.loads(r1.text)
print(content)
return content

except requests.HTTPError:
Expand Down
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import AccountInfo
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Account import AccountInfo


class TestAccountDetails(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Applications
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Applications import Applications


class TestCreateApplication(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import AvailableNumber
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.AvailableNumber import AvailableNumber


class TestAvailableNumber(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import call
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.call import call


class TestMakeCall(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Client
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Client import Client


class TestCreateClient(unittest.TestCase):

Expand Down
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Email
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Email import Email


class TestEmail(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Gateway
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Gateway import Gateway


class TestCreateGateway(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import IncomingNumber
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.IncomingNumber import IncomingNumber


class TestPhoneNumberList(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Notification
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Notification import Notification


class TestNotificationList(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Recording
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Recording import Recording


class TestRecordingList(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Sms
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Sms import Sms


class TestSendSms(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Transcription
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Transcription import Transcription


class TestTranscriptionList(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk import Usage
import unittest

import vcr

from Restcomm_Python_SDk.Restcomm.Usage import Usage


class TestUsage(unittest.TestCase):

@vcr.use_cassette(record_mode='new_episodes')
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
101 changes: 50 additions & 51 deletions Restcomm_Python_SDk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,54 +22,53 @@
Name: Md Sharique
Email : nukles1.07@gmail.com
'''

from Restcomm_Python_SDk.AccountInfo import client
from Restcomm_Python_SDk.AccountInfo import AccountDetails
from Restcomm_Python_SDk.AccountInfo import ChangeAccountPassword
from Restcomm_Python_SDk.AccountInfo import CreateSubAccount
from Restcomm_Python_SDk.AccountInfo import CloseSubAccount
from Restcomm_Python_SDk.AccountInfo import SubAccountDetails
from Restcomm_Python_SDk.Applications import client
from Restcomm_Python_SDk.Applications import GetApplicationList
from Restcomm_Python_SDk.Applications import CreateApplication
from Restcomm_Python_SDk.Applications import DeleteApplication
from Restcomm_Python_SDk.Applications import UpdateApplication
from Restcomm_Python_SDk.AvailableNumber import client
from Restcomm_Python_SDk.AvailableNumber import NumberAvailablity
from Restcomm_Python_SDk.call import client
from Restcomm_Python_SDk.call import Makecall
from Restcomm_Python_SDk.call import GetCallDetail
from Restcomm_Python_SDk.call import MuteParticipant
from Restcomm_Python_SDk.call import UnMuteParticipant
from Restcomm_Python_SDk.call import RedirectCall
from Restcomm_Python_SDk.call import ConferenceCall
from Restcomm_Python_SDk.Client import client
from Restcomm_Python_SDk.Client import CreateClient
from Restcomm_Python_SDk.Client import ChangeClientPassword
from Restcomm_Python_SDk.Client import ClientList
from Restcomm_Python_SDk.Client import DeleteClient
from Restcomm_Python_SDk.Email import SendEmail
from Restcomm_Python_SDk.Email import client
from Restcomm_Python_SDk.Sms import client
from Restcomm_Python_SDk.Sms import SmsList
from Restcomm_Python_SDk.Sms import SendSms
from Restcomm_Python_SDk.Sms import SmsPagingInformation
from Restcomm_Python_SDk.Sms import FilterSmsList
from Restcomm_Python_SDk.Gateway import client
from Restcomm_Python_SDk.Gateway import CreateGateway
from Restcomm_Python_SDk.Gateway import GetlistGateway
from Restcomm_Python_SDk.Gateway import UpdateGateway
from Restcomm_Python_SDk.Gateway import DeleteGateway
from Restcomm_Python_SDk.Notification import NotificationList
from Restcomm_Python_SDk.Notification import client
from Restcomm_Python_SDk.Notification import NotificationFilter
from Restcomm_Python_SDk.Recording import RecordingList
from Restcomm_Python_SDk.Recording import client
from Restcomm_Python_SDk.Recording import RecordingFilter
from Restcomm_Python_SDk.Transcription import TranscriptionList
from Restcomm_Python_SDk.Transcription import client
from Restcomm_Python_SDk.Transcription import TranscriptionFilter
from Restcomm_Python_SDk.Usage import client
from Restcomm_Python_SDk.Usage import Usages
from Restcomm_Python_SDk.UssdPush import client
from Restcomm_Python_SDk.UssdPush import UssdPush
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import AccountDetails
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import ChangeAccountPassword
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import CloseSubAccount
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import CreateSubAccount
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import SubAccountDetails
from Restcomm_Python_SDk.Restcomm.Account.AccountInfo import client
from Restcomm_Python_SDk.Restcomm.Applications.Applications import CreateApplication
from Restcomm_Python_SDk.Restcomm.Applications.Applications import DeleteApplication
from Restcomm_Python_SDk.Restcomm.Applications.Applications import GetApplicationList
from Restcomm_Python_SDk.Restcomm.Applications.Applications import UpdateApplication
from Restcomm_Python_SDk.Restcomm.Applications.Applications import client
from Restcomm_Python_SDk.Restcomm.AvailableNumber.AvailableNumber import NumberAvailablity
from Restcomm_Python_SDk.Restcomm.AvailableNumber.AvailableNumber import client
from Restcomm_Python_SDk.Restcomm.Client.Client import ChangeClientPassword
from Restcomm_Python_SDk.Restcomm.Client.Client import ClientList
from Restcomm_Python_SDk.Restcomm.Client.Client import CreateClient
from Restcomm_Python_SDk.Restcomm.Client.Client import DeleteClient
from Restcomm_Python_SDk.Restcomm.Client.Client import client
from Restcomm_Python_SDk.Restcomm.Email.Email import SendEmail
from Restcomm_Python_SDk.Restcomm.Email.Email import client
from Restcomm_Python_SDk.Restcomm.Gateway.Gateway import CreateGateway
from Restcomm_Python_SDk.Restcomm.Gateway.Gateway import DeleteGateway
from Restcomm_Python_SDk.Restcomm.Gateway.Gateway import GetlistGateway
from Restcomm_Python_SDk.Restcomm.Gateway.Gateway import UpdateGateway
from Restcomm_Python_SDk.Restcomm.Gateway.Gateway import client
from Restcomm_Python_SDk.Restcomm.Notification.Notification import NotificationFilter
from Restcomm_Python_SDk.Restcomm.Notification.Notification import NotificationList
from Restcomm_Python_SDk.Restcomm.Notification.Notification import client
from Restcomm_Python_SDk.Restcomm.Recording.Recording import RecordingFilter
from Restcomm_Python_SDk.Restcomm.Recording.Recording import RecordingList
from Restcomm_Python_SDk.Restcomm.Recording.Recording import client
from Restcomm_Python_SDk.Restcomm.Sms.Sms import FilterSmsList
from Restcomm_Python_SDk.Restcomm.Sms.Sms import SendSms
from Restcomm_Python_SDk.Restcomm.Sms.Sms import SmsList
from Restcomm_Python_SDk.Restcomm.Sms.Sms import SmsPagingInformation
from Restcomm_Python_SDk.Restcomm.Sms.Sms import client
from Restcomm_Python_SDk.Restcomm.Transcription.Transcription import TranscriptionFilter
from Restcomm_Python_SDk.Restcomm.Transcription.Transcription import TranscriptionList
from Restcomm_Python_SDk.Restcomm.Transcription.Transcription import client
from Restcomm_Python_SDk.Restcomm.Usage.Usage import Usages
from Restcomm_Python_SDk.Restcomm.Usage.Usage import client
from Restcomm_Python_SDk.Restcomm.UssdPush.UssdPush import UssdPush
from Restcomm_Python_SDk.Restcomm.UssdPush.UssdPush import client
from Restcomm_Python_SDk.Restcomm.call.call import ConferenceCall
from Restcomm_Python_SDk.Restcomm.call.call import GetCallDetail
from Restcomm_Python_SDk.Restcomm.call.call import Makecall
from Restcomm_Python_SDk.Restcomm.call.call import MuteParticipant
from Restcomm_Python_SDk.Restcomm.call.call import RedirectCall
from Restcomm_Python_SDk.Restcomm.call.call import UnMuteParticipant
from Restcomm_Python_SDk.Restcomm.call.call import client
Loading

0 comments on commit 2e488cd

Please sign in to comment.