Skip to content

Commit

Permalink
Merge pull request twilio#19 from TwilioDevEd/rest-resources-sip-connect
Browse files Browse the repository at this point in the history
Rest resources sip connect
  • Loading branch information
mcelicalderon committed Apr 22, 2016
2 parents 75b7d7b + bfe2754 commit 11b24de
Show file tree
Hide file tree
Showing 122 changed files with 78 additions and 149 deletions.
Expand Up @@ -20,7 +20,6 @@ public static void main(String[] args) throws TwilioRestException {
// Loop over credentials and print out a property for each one.
for (Credential credential : credentials) {
System.out.println(credential.getUsername());
}

}
}
}
Expand Up @@ -10,4 +10,4 @@
// Loop over the list of credentials and echo a property for each one
foreach ($client->account->sip->credential_lists->get("CL32a3c49700934481addd5ce1659f04d2")->credentials as $credential) {
echo $credential->username;
}
}
Expand Up @@ -7,4 +7,4 @@
client = TwilioRestClient(account_sid, auth_token)

# A list of credential objects with the properties described above
credentials = client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").list()
credentials = client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").list()
Expand Up @@ -7,8 +7,7 @@
auth_token = '{{ auth_token }}'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over credentials and print out a property for each one
@client.account.sip.credential_lists.get("CL32a3c49700934481addd5ce1659f04d2").credentials.list.each do |credential|
puts credential.username
end
end
@@ -1,4 +1,4 @@
{
"title": "get-credential-lists-credentials",
"title": "List all Credentials",
"type": "server"
}
}
1 change: 0 additions & 1 deletion rest/credential/create-credential/create-credential.cs
Expand Up @@ -9,7 +9,6 @@ static void Main(string[] args)
string AccountSid = "AC32a3c49700934481addd5ce1659f04d2";
string AuthToken = "{{ auth_token }}";
var twilio = new TwilioRestClient(AccountSid, AuthToken);


var credential = twilio.CreateCredential("CL32a3c49700934481addd5ce1659f04d2", "WeeBey", "05");

Expand Down
3 changes: 1 addition & 2 deletions rest/credential/create-credential/create-credential.java
Expand Up @@ -22,8 +22,7 @@ public static void main(String[] args) throws TwilioRestException {
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("Username", "WeeBey"));
params.add(new BasicNameValuePair("Password", "05"));



CredentialFactory credentialFactory = client.getAccount().getCredentialList("CL32a3c49700934481addd5ce1659f04d2").getCredentialFactory();
Credential credential = credentialFactory.create(params);
System.out.println(credential.getSid());
Expand Down
2 changes: 1 addition & 1 deletion rest/credential/create-credential/create-credential.php
Expand Up @@ -8,4 +8,4 @@
$client = new Services_Twilio($sid, $token);

$credential = $client->account->sip->credential_lists->get("CL32a3c49700934481addd5ce1659f04d2")->credentials->create("WeeBey", "05", array());
echo $credential->sid;
echo $credential->sid;
2 changes: 1 addition & 1 deletion rest/credential/create-credential/create-credential.py
Expand Up @@ -8,4 +8,4 @@

credential = client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").create(username="WeeBey",
password="05")
print credential.sid
print credential.sid
2 changes: 1 addition & 1 deletion rest/credential/create-credential/create-credential.rb
Expand Up @@ -9,4 +9,4 @@

credential = @client.account.sip.credential_lists.get("CL32a3c49700934481addd5ce1659f04d2").credentials.create(:username => "WeeBey",
:password => "05")
puts credential.username
puts credential.username
4 changes: 2 additions & 2 deletions rest/credential/create-credential/meta.json
@@ -1,4 +1,4 @@
{
"title": "create-credential",
"title": "Create a Credential",
"type": "server"
}
}
2 changes: 1 addition & 1 deletion rest/credential/update-credential/meta.json
@@ -1,4 +1,4 @@
{
"title": "update-credential",
"title": "Update a Credential",
"type": "server"
}
2 changes: 0 additions & 2 deletions rest/credential/update-credential/update-credential.cs
Expand Up @@ -9,8 +9,6 @@ static void Main(string[] args)
string AccountSid = "AC32a3c49700934481addd5ce1659f04d2";
string AuthToken = "{{ auth_token }}";
var twilio = new TwilioRestClient(AccountSid, AuthToken);



twilio.UpdateCredential("CL32a3c49700934481addd5ce1659f04d2", "SC32a3c49700934481addd5ce1659f04d2", null, "07");
}
Expand Down
3 changes: 1 addition & 2 deletions rest/credential/update-credential/update-credential.java
Expand Up @@ -23,7 +23,6 @@ public static void main(String[] args) throws TwilioRestException {
// Build a filter for the CredentialList
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("Password", "07"));
credential.update(params);

credential.update(params);
}
}
2 changes: 1 addition & 1 deletion rest/credential/update-credential/update-credential.php
Expand Up @@ -13,4 +13,4 @@
$credential->update(array(
"Password" => "07"
));
echo $credential->username;
echo $credential->username;
2 changes: 1 addition & 1 deletion rest/credential/update-credential/update-credential.py
Expand Up @@ -7,4 +7,4 @@
client = TwilioRestClient(account_sid, auth_token)

credential = client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").update("SC32a3c49700934481addd5ce1659f04d2", password="07")
print credential.username
print credential.username
2 changes: 1 addition & 1 deletion rest/credential/update-credential/update-credential.rb
Expand Up @@ -11,4 +11,4 @@
# check out the list resource examples on this page
@credential = @client.account.sip.credential_lists.get("CL32a3c49700934481addd5ce1659f04d2").credentials.get("SC32a3c49700934481addd5ce1659f04d2")
@credential.update(:password => "07")
puts @credential.username
puts @credential.username
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/instance-delete/meta.json
@@ -0,0 +1,4 @@
{
"title": "instance-delete",
"type": "server"
}
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/instance-get-example-1/meta.json
@@ -0,0 +1,4 @@
{
"title": "instance-get-example-1",
"type": "server"
}
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/instance-post-example-1/meta.json
@@ -0,0 +1,4 @@
{
"title": "instance-post-example-1",
"type": "server"
}
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/list-get-example-1/meta.json
@@ -0,0 +1,4 @@
{
"title": "list-get-example-1",
"type": "server"
}
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/list-get-example-2/meta.json
@@ -0,0 +1,4 @@
{
"title": "list-get-example-2",
"type": "server"
}
4 changes: 4 additions & 0 deletions rest/outgoing-caller-ids/list-post-example-1/meta.json
@@ -0,0 +1,4 @@
{
"title": "list-post-example-1",
"type": "server"
}

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/instance_delete/meta.json

This file was deleted.

10 changes: 0 additions & 10 deletions rest/outgoing-caller-ids/python/instance_get/instance_get.py

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/instance_get/meta.json

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/instance_post/meta.json

This file was deleted.

10 changes: 0 additions & 10 deletions rest/outgoing-caller-ids/python/list_get_1/list_get_1.py

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/list_get_1/meta.json

This file was deleted.

14 changes: 0 additions & 14 deletions rest/outgoing-caller-ids/python/list_get_2/list_get_2.py

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/list_get_2/meta.json

This file was deleted.

10 changes: 0 additions & 10 deletions rest/outgoing-caller-ids/python/list_post/list_post.py

This file was deleted.

4 changes: 0 additions & 4 deletions rest/outgoing-caller-ids/python/list_post/meta.json

This file was deleted.

2 changes: 1 addition & 1 deletion rest/sip-in/create-credential-list/meta.json
@@ -1,4 +1,4 @@
{
"title": "create-credential-list",
"title": "Create a new Credential List",
"type": "server"
}
4 changes: 2 additions & 2 deletions rest/sip-in/create-credential/meta.json
@@ -1,4 +1,4 @@
{
"title": "create-credential",
"title": "Create a Credential",
"type": "server"
}
}
2 changes: 1 addition & 1 deletion rest/sip-in/delete-credential-list-instance/meta.json
@@ -1,4 +1,4 @@
{
"title": "delete-credential-list-instance",
"title": "Delete a Credential List",
"type": "server"
}
4 changes: 2 additions & 2 deletions rest/sip-in/delete-credential-list-mapping/meta.json
@@ -1,4 +1,4 @@
{
"title": "delete-credential-list-mapping",
"title": "Delete a CredentialListMapping",
"type": "server"
}
}
3 changes: 1 addition & 2 deletions rest/sip-in/delete-credential/delete-credential.java
Expand Up @@ -16,7 +16,6 @@ public static void main(String[] args) throws TwilioRestException {
// check out the list resource examples on this page
Credential credential = client.getAccount().getCredentialList("CL32a3c49700934481addd5ce1659f04d2").getCredential("SC32a3c49700934481addd5ce1659f04d2");

credential.delete();

credential.delete();
}
}
2 changes: 1 addition & 1 deletion rest/sip-in/delete-credential/delete-credential.php
Expand Up @@ -7,4 +7,4 @@
$token = "{{ auth_token }}";
$client = new Services_Twilio($sid, $token);

$client->account->sip->credential_lists->get("CL32a3c49700934481addd5ce1659f04d2")->credentials->delete("SC32a3c49700934481addd5ce1659f04d2");
$client->account->sip->credential_lists->get("CL32a3c49700934481addd5ce1659f04d2")->credentials->delete("SC32a3c49700934481addd5ce1659f04d2");
2 changes: 1 addition & 1 deletion rest/sip-in/delete-credential/delete-credential.py
Expand Up @@ -6,4 +6,4 @@
auth_token = "{{ auth_token }}"
client = TwilioRestClient(account_sid, auth_token)

client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").delete("SC32a3c49700934481addd5ce1659f04d2")
client.sip.credentials("CL32a3c49700934481addd5ce1659f04d2").delete("SC32a3c49700934481addd5ce1659f04d2")
2 changes: 1 addition & 1 deletion rest/sip-in/delete-credential/delete-credential.rb
Expand Up @@ -8,4 +8,4 @@
@client = Twilio::REST::Client.new account_sid, auth_token

@credential = @client.account.sip.credential_lists.get("CL32a3c49700934481addd5ce1659f04d2").credentials.get("SC32a3c49700934481addd5ce1659f04d2")
@credential.delete
@credential.delete
4 changes: 2 additions & 2 deletions rest/sip-in/delete-credential/meta.json
@@ -1,4 +1,4 @@
{
"title": "delete-credential",
"title": "Delete a Credential",
"type": "server"
}
}
4 changes: 2 additions & 2 deletions rest/sip-in/get-credential-list-instance/meta.json
@@ -1,4 +1,4 @@
{
"title": "get-credential-list-instance",
"title": "Get a Credential List",
"type": "server"
}
}
4 changes: 2 additions & 2 deletions rest/sip-in/get-credential-list-mappings/meta.json
@@ -1,4 +1,4 @@
{
"title": "get-credential-list-mappings",
"title": "Get a CredentialListMapping",
"type": "server"
}
}
4 changes: 2 additions & 2 deletions rest/sip-in/get-credential-lists-credentials/meta.json
@@ -1,4 +1,4 @@
{
"title": "get-credential-lists-credentials",
"title": "List all Credentials in a CredentialList",
"type": "server"
}
}
3 changes: 1 addition & 2 deletions rest/sip-in/get-credential-lists/get-credential-lists.java
Expand Up @@ -20,7 +20,6 @@ public static void main(String[] args) throws TwilioRestException {
// Loop over credentialLists and print out a property for each one.
for (CredentialListInstance credentialList : credentialLists) {
System.out.println(credentialList.getFriendlyName());
}

}
}
}
2 changes: 1 addition & 1 deletion rest/sip-in/get-credential-lists/get-credential-lists.php
Expand Up @@ -10,4 +10,4 @@
// Loop over the list of credential_lists and echo a property for each one
foreach ($client->account->sip->credential_lists as $credential_list) {
echo $credential_list->friendly_name;
}
}
2 changes: 1 addition & 1 deletion rest/sip-in/get-credential-lists/get-credential-lists.py
Expand Up @@ -7,4 +7,4 @@
client = TwilioRestClient(account_sid, auth_token)

# A list of credential_list objects with the properties described above
credential_lists = client.sip.credential_lists.list()
credential_lists = client.sip.credential_lists.list()
2 changes: 1 addition & 1 deletion rest/sip-in/get-credential-lists/get-credential-lists.rb
Expand Up @@ -11,4 +11,4 @@
# Loop over credential_lists and print out a property for each one
@client.account.sip.credential_lists.list.each do |credential_list|
puts credential_list.friendly_name
end
end
4 changes: 2 additions & 2 deletions rest/sip-in/get-credential-lists/meta.json
@@ -1,4 +1,4 @@
{
"title": "get-credential-lists",
"title": "Gets all Credential Lists",
"type": "server"
}
}

0 comments on commit 11b24de

Please sign in to comment.