com.twilio.sdk
Class TwilioRestClient

java.lang.Object
  extended by com.twilio.sdk.TwilioClient
      extended by com.twilio.sdk.TwilioRestClient

public class TwilioRestClient
extends TwilioClient

The client class that access http://api.twilio.com.


Field Summary
 
Fields inherited from class com.twilio.sdk.TwilioClient
DEFAULT_VERSION
 
Constructor Summary
TwilioRestClient(String accountSid, String authToken)
           
TwilioRestClient(String accountSid, String authToken, String endpoint)
           
 
Method Summary
 Account getAccount()
          A shortcut for the most common case, returning the Account object for this authenticated client.
 Account getAccount(String sid)
          Get an account by account sid.
 AccountFactory getAccountFactory()
          Return an account factory to create new subaccounts
 AccountList getAccounts()
          Get all accounts.
 AccountList getAccounts(Map<String,String> params)
          Get a list of Account objects.
 
Methods inherited from class com.twilio.sdk.TwilioClient
get, getAccountSid, getEndpoint, getHttpClient, getNumRetries, request, request, requestStream, requestStream, safeRequest, safeRequest, setHttpClient, setNumRetries
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwilioRestClient

public TwilioRestClient(String accountSid,
                        String authToken)

TwilioRestClient

public TwilioRestClient(String accountSid,
                        String authToken,
                        String endpoint)
Method Detail

getAccounts

public AccountList getAccounts(Map<String,String> params)
Get a list of Account objects. For more info: https://www.twilio.com/docs/api/rest/account

Parameters:
params - Filter the list with the given params. See the Twilio docs for available filters.
Returns:
the list of accounts.

getAccounts

public AccountList getAccounts()
Get all accounts. For more info: https://www.twilio.com/docs/api/rest/account

Returns:
the list of accounts.

getAccountFactory

public AccountFactory getAccountFactory()
Return an account factory to create new subaccounts

Returns:
the list of accounts

getAccount

public Account getAccount()
A shortcut for the most common case, returning the Account object for this authenticated client.

Returns:
Account that maps to the authenticated account.

getAccount

public Account getAccount(String sid)
Get an account by account sid.

Parameters:
sid - The sid of the account you want to fetch.
Returns:
the account


Copyright © 2011 Twilio, Inc. All Rights Reserved.