payfrit-works/twilio/docs/TwilioLib/classes/RESTClient.html

369 lines
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by colddoc on {ts '2011-06-16 08:20:03'} -->
<TITLE>
Callable
</TITLE>
<META NAME="keywords" CONTENT="TwilioLib.classes.concurrent.Callable interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="RESTClient";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="##EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
CFML Twilio Library 1.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?TwilioLib/classes/RESTClient.html" target="_top"><B>FRAMES</B></A> &nbsp;
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
TwilioLib.classes</FONT>
<BR>
Class RESTClient</H2>
<PRE>WEB-INF.cftags.component
<IMG SRC="../../resources/inherit.gif" ALT="extended by ">twilio.classes.RESTClient
</PRE>
<HR>
<DL>
<DT>
<PRE>public class <B>RESTClient</B>
<DT>extends WEB-INF.cftags.component</DT></PRE>
</DT>
</DL>
<HR>
<p>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD>
<CODE><B><A HREF="RESTClient.html#init()">init</A></B>(any accountSid, any authToken, any ApiVersion, any EndPoint, any DefaultResponse='xml')</CODE>
<BR>
</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private&nbsp;struct</CODE></FONT></TD>
<TD><CODE><B><A HREF="RESTClient.html#buildUrl()">buildUrl</A></B>(any resource='', any requestObj='')</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Builds the full URL for the resource being accessed
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;any</CODE></FONT></TD>
<TD><CODE><B><A HREF="RESTClient.html#sendRequest()">sendRequest</A></B>(string Resource, string Method='GET', struct Vars='[runtime expression]')</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs the HTTP request and sends it off to Twilio
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private&nbsp;string</CODE></FONT></TD>
<TD><CODE><B><A HREF="RESTClient.html#verifyParameterKey()">verifyParameterKey</A></B>(string parameter, any requestObj)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verifies the parameter key is a valid key for any Twilio REST resource and ensures that the key is in the proper case
</TD>
</TR>
</TR>
</TABLE>
&nbsp;
<a name="methods_inherited_from_class_WEB-INF.cftags.component"><!-- --></a>
<table summary="" border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableSubHeadingColor" bgcolor="#eeeeff">
<th align="left"><b>Methods inherited from class WEB-INF.cftags.component</b></th>
</tr>
<tr class="TableRowColor" bgcolor="white">
<td>
<code></code>
</td>
</tr>
</tbody></table>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<a name="constructor_detail"><!-- --></a>
</p><table summary="" border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<th colspan="1" align="left"><font size="+2">
<b>Constructor Detail</b></font></th>
</tr>
</tbody></table>
<a name="init()"><!-- --></a><h3>
init</h3>
<CODE>public <B>init</B>(any accountSid, any authToken, any ApiVersion, any EndPoint, any DefaultResponse='xml')</CODE>
<dl>
<dd>
<p>
</p>
<dl>
<dt><b>Parameters:</b></dt>
<dd><code>accountSid</code></dd>
<dd><code>authToken</code></dd>
<dd><code>ApiVersion</code></dd>
<dd><code>EndPoint</code></dd>
<dd><code>DefaultResponse</code></dd>
</dl>
</dd></dl>
<!-- ============ METHOD DETAIL ========== -->
<a name="method_detail"><!-- --></a>
<table summary="" border="1" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="TableHeadingColor" bgcolor="#ccccff">
<th colspan="1" align="left"><font size="+2">
<b>Method Detail</b></font></th>
</tr>
</tbody></table>
<a name="buildUrl()"><!-- --></a><h3>
buildUrl</h3>
<code>private struct <B>buildUrl</B>(any resource='', any requestObj='')</code>
<dl>
<dd>
Builds the full URL for the resource being accessed.
<p>
</p></dd>
<dl>
<dt><b>Parameters:</b></dt>
<dd><code>resource</code></dd>
<dd><code>requestObj</code></dd>
</dl>
</dd>
</dl>
<hr>
<a name="sendRequest()"><!-- --></a><h3>
sendRequest</h3>
<code>public any <B>sendRequest</B>(string Resource, string Method='GET', struct Vars='[runtime expression]')</code>
<dl>
<dd>
Constructs the HTTP request and sends it off to Twilio.
<p>
</p></dd>
<dl>
<dt><b>Parameters:</b></dt>
<dd><code>Resource</code> - The resource that is being requested.</dd>
<dd><code>Method</code> - The HTTP method that is being used to request the resource, valid methods include: GET, POST, PUT, DELETE.</dd>
<dd><code>Vars</code> - The parameters that are to be sent with the request.</dd>
</dl>
</dd>
</dl>
<hr>
<a name="verifyParameterKey()"><!-- --></a><h3>
verifyParameterKey</h3>
<code>private string <B>verifyParameterKey</B>(string parameter, any requestObj)</code>
<dl>
<dd>
Verifies the parameter key is a valid key for any Twilio REST resource and ensures that the key is in the proper case.
<p>
</p></dd>
<dl>
<dt><b>Parameters:</b></dt>
<dd><code>parameter</code> - The parameter to check.</dd>
<dd><code>requestObj</code> - An instance of the RESTRequest object which will be used to get the valid parameters.</dd>
</dl>
</dd>
</dl>
<hr>
<!-- ========= START OF NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="##EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
CFML Twilio Library 1.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?TwilioLib/classes/RESTClient.html" target="_top"><B>FRAMES</B></A> &nbsp;
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF NAVBAR ========= -->
<HR>
</BODY>
</HTML>