summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Diaz-Padron <cdpadron@twilio.com>2016-02-23 11:45:23 -0800
committerCarlos Diaz-Padron <cdpadron@twilio.com>2016-02-23 11:45:23 -0800
commit17ef4e9dc24ea4707cc88708e2485ac28d30b5e7 (patch)
treeee2807d76cf1f5e83aff9b2ab1c51f07bafb943b
parent8ca9d0b6ad0fe8b602d9144a28aa116c42b2b138 (diff)
downloadtwilio-php-17ef4e9dc24ea4707cc88708e2485ac28d30b5e7.zip
twilio-php-17ef4e9dc24ea4707cc88708e2485ac28d30b5e7.tar.gz
twilio-php-17ef4e9dc24ea4707cc88708e2485ac28d30b5e7.tar.bz2
Remove old docs
-rw-r--r--Makefile6
-rw-r--r--docs/Makefile130
-rw-r--r--docs/_themes/.gitignore3
-rw-r--r--docs/_themes/LICENSE45
-rw-r--r--docs/_themes/README.rst25
-rw-r--r--docs/_themes/flask_theme_support.py86
-rw-r--r--docs/_themes/kr/layout.html32
-rw-r--r--docs/_themes/kr/relations.html19
-rw-r--r--docs/_themes/kr/static/flasky.css_t469
-rw-r--r--docs/_themes/kr/static/small_flask.css70
-rw-r--r--docs/_themes/kr/theme.conf7
-rw-r--r--docs/_themes/kr_small/layout.html22
-rw-r--r--docs/_themes/kr_small/static/flasky.css_t287
-rw-r--r--docs/_themes/kr_small/theme.conf10
-rw-r--r--docs/api/rest.rst872
-rw-r--r--docs/api/services.rst26
-rw-r--r--docs/api/taskrouter.rst762
-rw-r--r--docs/api/twiml.rst7
-rw-r--r--docs/conf.py226
-rw-r--r--docs/faq.rst130
-rw-r--r--docs/index.rst232
-rw-r--r--docs/quickstart.rst34
-rw-r--r--docs/requirements.txt3
-rw-r--r--docs/usage/rest.rst98
-rw-r--r--docs/usage/rest/accounts.rst24
-rw-r--r--docs/usage/rest/applications.rst50
-rw-r--r--docs/usage/rest/callerids.rst27
-rw-r--r--docs/usage/rest/calls.rst159
-rw-r--r--docs/usage/rest/conferences.rst48
-rw-r--r--docs/usage/rest/members.rst46
-rw-r--r--docs/usage/rest/messages.rst63
-rw-r--r--docs/usage/rest/notifications.rst13
-rw-r--r--docs/usage/rest/phonenumbers.rst187
-rw-r--r--docs/usage/rest/pricing.rst137
-rw-r--r--docs/usage/rest/queues.rst56
-rw-r--r--docs/usage/rest/recordings.rst61
-rw-r--r--docs/usage/rest/sip.rst88
-rw-r--r--docs/usage/rest/sms-messages.rst50
-rw-r--r--docs/usage/rest/transcriptions.rst13
-rw-r--r--docs/usage/rest/usage-records.rst91
-rw-r--r--docs/usage/rest/usage-triggers.rst92
-rw-r--r--docs/usage/taskrouter.rst35
-rw-r--r--docs/usage/taskrouter/activities.rst82
-rw-r--r--docs/usage/taskrouter/events.rst39
-rw-r--r--docs/usage/taskrouter/reservations.rst29
-rw-r--r--docs/usage/taskrouter/statistics.rst104
-rw-r--r--docs/usage/taskrouter/task-queues.rst86
-rw-r--r--docs/usage/taskrouter/tasks.rst86
-rw-r--r--docs/usage/taskrouter/workers.rst81
-rw-r--r--docs/usage/taskrouter/workflows.rst87
-rw-r--r--docs/usage/taskrouter/workspaces.rst77
-rw-r--r--docs/usage/token-generation.rst64
-rw-r--r--docs/usage/twiml.rst347
-rw-r--r--docs/usage/validation.rst66
54 files changed, 3 insertions, 5986 deletions
diff --git a/Makefile b/Makefile
index 11289fb..e0433ad 100644
--- a/Makefile
+++ b/Makefile
@@ -52,11 +52,11 @@ test:
venv:
virtualenv venv
-docs-install: venv
- . venv/bin/activate; pip install -r docs/requirements.txt
+docs-install:
+ brew install apigen
docs:
- . venv/bin/activate; cd docs && make html
+ sh docs-update.sh
release-install:
pear channel-discover twilio.github.com/pear || true
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index d5756c7..0000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Services_Twilio.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Services_Twilio.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/Services_Twilio"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Services_Twilio"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- make -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/_themes/.gitignore b/docs/_themes/.gitignore
deleted file mode 100644
index 66b6e4c..0000000
--- a/docs/_themes/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.pyc
-*.pyo
-.DS_Store
diff --git a/docs/_themes/LICENSE b/docs/_themes/LICENSE
deleted file mode 100644
index b160a8e..0000000
--- a/docs/_themes/LICENSE
+++ /dev/null
@@ -1,45 +0,0 @@
-Modifications:
-
-Copyright (c) 2011 Kenneth Reitz.
-
-
-Original Project:
-
-Copyright (c) 2010 by Armin Ronacher.
-
-
-Some rights reserved.
-
-Redistribution and use in source and binary forms of the theme, with or
-without modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
-* The names of the contributors may not be used to endorse or
- promote products derived from this software without specific
- prior written permission.
-
-We kindly ask you to only use these themes in an unmodified manner just
-for Flask and Flask-related products, not for unrelated projects. If you
-like the visual style and want to use it for your own projects, please
-consider making some larger changes to the themes (such as changing
-font faces, sizes, colors or margins).
-
-THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/docs/_themes/README.rst b/docs/_themes/README.rst
deleted file mode 100644
index 8648482..0000000
--- a/docs/_themes/README.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-krTheme Sphinx Style
-====================
-
-This repository contains sphinx styles Kenneth Reitz uses in most of
-his projects. It is a drivative of Mitsuhiko's themes for Flask and Flask related
-projects. To use this style in your Sphinx documentation, follow
-this guide:
-
-1. put this folder as _themes into your docs folder. Alternatively
- you can also use git submodules to check out the contents there.
-
-2. add this to your conf.py: ::
-
- sys.path.append(os.path.abspath('_themes'))
- html_theme_path = ['_themes']
- html_theme = 'flask'
-
-The following themes exist:
-
-**kr**
- the standard flask documentation theme for large projects
-
-**kr_small**
- small one-page theme. Intended to be used by very small addon libraries.
-
diff --git a/docs/_themes/flask_theme_support.py b/docs/_themes/flask_theme_support.py
deleted file mode 100644
index 33f4744..0000000
--- a/docs/_themes/flask_theme_support.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# flasky extensions. flasky pygments style based on tango style
-from pygments.style import Style
-from pygments.token import Keyword, Name, Comment, String, Error, \
- Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
-
-
-class FlaskyStyle(Style):
- background_color = "#f8f8f8"
- default_style = ""
-
- styles = {
- # No corresponding class for the following:
- #Text: "", # class: ''
- Whitespace: "underline #f8f8f8", # class: 'w'
- Error: "#a40000 border:#ef2929", # class: 'err'
- Other: "#000000", # class 'x'
-
- Comment: "italic #8f5902", # class: 'c'
- Comment.Preproc: "noitalic", # class: 'cp'
-
- Keyword: "bold #004461", # class: 'k'
- Keyword.Constant: "bold #004461", # class: 'kc'
- Keyword.Declaration: "bold #004461", # class: 'kd'
- Keyword.Namespace: "bold #004461", # class: 'kn'
- Keyword.Pseudo: "bold #004461", # class: 'kp'
- Keyword.Reserved: "bold #004461", # class: 'kr'
- Keyword.Type: "bold #004461", # class: 'kt'
-
- Operator: "#582800", # class: 'o'
- Operator.Word: "bold #004461", # class: 'ow' - like keywords
-
- Punctuation: "bold #000000", # class: 'p'
-
- # because special names such as Name.Class, Name.Function, etc.
- # are not recognized as such later in the parsing, we choose them
- # to look the same as ordinary variables.
- Name: "#000000", # class: 'n'
- Name.Attribute: "#c4a000", # class: 'na' - to be revised
- Name.Builtin: "#004461", # class: 'nb'
- Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
- Name.Class: "#000000", # class: 'nc' - to be revised
- Name.Constant: "#000000", # class: 'no' - to be revised
- Name.Decorator: "#888", # class: 'nd' - to be revised
- Name.Entity: "#ce5c00", # class: 'ni'
- Name.Exception: "bold #cc0000", # class: 'ne'
- Name.Function: "#000000", # class: 'nf'
- Name.Property: "#000000", # class: 'py'
- Name.Label: "#f57900", # class: 'nl'
- Name.Namespace: "#000000", # class: 'nn' - to be revised
- Name.Other: "#000000", # class: 'nx'
- Name.Tag: "bold #004461", # class: 'nt' - like a keyword
- Name.Variable: "#000000", # class: 'nv' - to be revised
- Name.Variable.Class: "#000000", # class: 'vc' - to be revised
- Name.Variable.Global: "#000000", # class: 'vg' - to be revised
- Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
-
- Number: "#990000", # class: 'm'
-
- Literal: "#000000", # class: 'l'
- Literal.Date: "#000000", # class: 'ld'
-
- String: "#4e9a06", # class: 's'
- String.Backtick: "#4e9a06", # class: 'sb'
- String.Char: "#4e9a06", # class: 'sc'
- String.Doc: "italic #8f5902", # class: 'sd' - like a comment
- String.Double: "#4e9a06", # class: 's2'
- String.Escape: "#4e9a06", # class: 'se'
- String.Heredoc: "#4e9a06", # class: 'sh'
- String.Interpol: "#4e9a06", # class: 'si'
- String.Other: "#4e9a06", # class: 'sx'
- String.Regex: "#4e9a06", # class: 'sr'
- String.Single: "#4e9a06", # class: 's1'
- String.Symbol: "#4e9a06", # class: 'ss'
-
- Generic: "#000000", # class: 'g'
- Generic.Deleted: "#a40000", # class: 'gd'
- Generic.Emph: "italic #000000", # class: 'ge'
- Generic.Error: "#ef2929", # class: 'gr'
- Generic.Heading: "bold #000080", # class: 'gh'
- Generic.Inserted: "#00A000", # class: 'gi'
- Generic.Output: "#888", # class: 'go'
- Generic.Prompt: "#745334", # class: 'gp'
- Generic.Strong: "bold #000000", # class: 'gs'
- Generic.Subheading: "bold #800080", # class: 'gu'
- Generic.Traceback: "bold #a40000", # class: 'gt'
- }
diff --git a/docs/_themes/kr/layout.html b/docs/_themes/kr/layout.html
deleted file mode 100644
index 7dfedb1..0000000
--- a/docs/_themes/kr/layout.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{%- extends "basic/layout.html" %}
-{%- block extrahead %}
- {{ super() }}
- {% if theme_touch_icon %}
- <link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
- {% endif %}
- <link media="only screen and (max-device-width: 480px)" href="{{
- pathto('_static/small_flask.css', 1) }}" type= "text/css" rel="stylesheet" />
-{% endblock %}
-{%- block relbar2 %}{% endblock %}
-{%- block footer %}
- <div class="footer">
- &copy; Copyright {{ copyright }}.
- </div>
- <script type="text/javascript">
- try {
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-2900316-11']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- } catch(err) {}
- </script>
- <a href="https://github.com/twilio/twilio-php">
- <img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
- </a>
-
-{%- endblock %}
diff --git a/docs/_themes/kr/relations.html b/docs/_themes/kr/relations.html
deleted file mode 100644
index 3bbcde8..0000000
--- a/docs/_themes/kr/relations.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<h3>Related Topics</h3>
-<ul>
- <li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
- {%- for parent in parents %}
- <li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
- {%- endfor %}
- {%- if prev %}
- <li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
- }}">{{ prev.title }}</a></li>
- {%- endif %}
- {%- if next %}
- <li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
- }}">{{ next.title }}</a></li>
- {%- endif %}
- {%- for parent in parents %}
- </ul></li>
- {%- endfor %}
- </ul></li>
-</ul>
diff --git a/docs/_themes/kr/static/flasky.css_t b/docs/_themes/kr/static/flasky.css_t
deleted file mode 100644
index aa3e8eb..0000000
--- a/docs/_themes/kr/static/flasky.css_t
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * flasky.css_t
- * ~~~~~~~~~~~~
- *
- * :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz.
- * :license: Flask Design License, see LICENSE for details.
- */
-
-{% set page_width = '940px' %}
-{% set sidebar_width = '220px' %}
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
- font-size: 17px;
- background-color: white;
- color: #000;
- margin: 0;
- padding: 0;
-}
-
-div.document {
- width: {{ page_width }};
- margin: 30px auto 0 auto;
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 0 0 0 {{ sidebar_width }};
-}
-
-div.sphinxsidebar {
- width: {{ sidebar_width }};
-}
-
-hr {
- border: 1px solid #B1B4B6;
-}
-
-div.body {
- background-color: #ffffff;
- color: #3E4349;
- padding: 0 30px 0 30px;
-}
-
-img.floatingflask {
- padding: 0 0 10px 10px;
- float: right;
-}
-
-div.footer {
- width: {{ page_width }};
- margin: 20px auto 30px auto;
- font-size: 14px;
- color: #888;
- text-align: right;
-}
-
-div.footer a {
- color: #888;
-}
-
-div.related {
- display: none;
-}
-
-div.sphinxsidebar a {
- color: #444;
- text-decoration: none;
- border-bottom: 1px dotted #999;
-}
-
-div.sphinxsidebar a:hover {
- border-bottom: 1px solid #999;
-}
-
-div.sphinxsidebar {
- font-size: 14px;
- line-height: 1.5;
-}
-
-div.sphinxsidebarwrapper {
- padding: 18px 10px;
-}
-
-div.sphinxsidebarwrapper p.logo {
- padding: 0;
- margin: -10px 0 0 -20px;
- text-align: center;
-}
-
-div.sphinxsidebar h3,
-div.sphinxsidebar h4 {
- font-family: 'Garamond', 'Georgia', serif;
- color: #444;
- font-size: 24px;
- font-weight: normal;
- margin: 0 0 5px 0;
- padding: 0;
-}
-
-div.sphinxsidebar h4 {
- font-size: 20px;
-}
-
-div.sphinxsidebar h3 a {
- color: #444;
-}
-
-div.sphinxsidebar p.logo a,
-div.sphinxsidebar h3 a,
-div.sphinxsidebar p.logo a:hover,
-div.sphinxsidebar h3 a:hover {
- border: none;
-}
-
-div.sphinxsidebar p {
- color: #555;
- margin: 10px 0;
-}
-
-div.sphinxsidebar ul {
- margin: 10px 0;
- padding: 0;
- color: #000;
-}
-
-div.sphinxsidebar input {
- border: 1px solid #ccc;
- font-family: 'Georgia', serif;
- font-size: 1em;
-}
-
-/* -- body styles ----------------------------------------------------------- */
-
-a {
- color: #004B6B;
- text-decoration: underline;
-}
-
-a:hover {
- color: #6D4100;
- text-decoration: underline;
-}
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- margin: 30px 0px 10px 0px;
- padding: 0;
-}
-
-div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
-div.body h2 { font-size: 180%; }
-div.body h3 { font-size: 150%; }
-div.body h4 { font-size: 130%; }
-div.body h5 { font-size: 100%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
- color: #ddd;
- padding: 0 4px;
- text-decoration: none;
-}
-
-a.headerlink:hover {
- color: #444;
- background: #eaeaea;
-}
-
-div.body p, div.body dd, div.body li {
- line-height: 1.4em;
-}
-
-div.admonition {
- background: #fafafa;
- margin: 20px -30px;
- padding: 10px 30px;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
-}
-
-div.admonition tt.xref, div.admonition a tt {
- border-bottom: 1px solid #fafafa;
-}
-
-dd div.admonition {
- margin-left: -60px;
- padding-left: 60px;
-}
-
-div.admonition p.admonition-title {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- font-size: 24px;
- margin: 0 0 10px 0;
- padding: 0;
- line-height: 1;
-}
-
-div.admonition p.last {
- margin-bottom: 0;
-}
-
-div.highlight {
- background-color: white;
-}
-
-dt:target, .highlight {
- background: #FAF3E8;
-}
-
-div.note {
- background-color: #eee;
- border: 1px solid #ccc;
-}
-
-div.seealso {
- background-color: #ffc;
- border: 1px solid #ff6;
-}
-
-div.topic {
- background-color: #eee;
-}
-
-p.admonition-title {
- display: inline;
-}
-
-p.admonition-title:after {
- content: ":";
-}
-
-pre, tt {
- font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
- font-size: 0.9em;
-}
-
-img.screenshot {
-}
-
-tt.descname, tt.descclassname {
- font-size: 0.95em;
-}
-
-tt.descname {
- padding-right: 0.08em;
-}
-
-img.screenshot {
- -moz-box-shadow: 2px 2px 4px #eee;
- -webkit-box-shadow: 2px 2px 4px #eee;
- box-shadow: 2px 2px 4px #eee;
-}
-
-table.docutils {
- border: 1px solid #888;
- -moz-box-shadow: 2px 2px 4px #eee;
- -webkit-box-shadow: 2px 2px 4px #eee;
- box-shadow: 2px 2px 4px #eee;
-}
-
-table.docutils td, table.docutils th {
- border: 1px solid #888;
- padding: 0.25em 0.7em;
-}
-
-table.field-list, table.footnote {
- border: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-
-table.footnote {
- margin: 15px 0;
- width: 100%;
- border: 1px solid #eee;
- background: #fdfdfd;
- font-size: 0.9em;
-}
-
-table.footnote + table.footnote {
- margin-top: -15px;
- border-top: none;
-}
-
-table.field-list th {
- padding: 0 0.8em 0 0;
-}
-
-table.field-list td {
- padding: 0;
-}
-
-table.footnote td.label {
- width: 0px;
- padding: 0.3em 0 0.3em 0.5em;
-}
-
-table.footnote td {
- padding: 0.3em 0.5em;
-}
-
-dl {
- margin: 0;
- padding: 0;
-}
-
-dl dd {
- margin-left: 30px;
-}
-
-blockquote {
- margin: 0 0 0 30px;
- padding: 0;
-}
-
-ul, ol {
- margin: 10px 0 10px 30px;
- padding: 0;
-}
-
-pre {
- background: #eee;
- padding: 7px 30px;
- margin: 15px -30px;
- line-height: 1.3em;
-}
-
-dl pre, blockquote pre, li pre {
- margin-left: -60px;
- padding-left: 60px;
-}
-
-dl dl pre {
- margin-left: -90px;
- padding-left: 90px;
-}
-
-tt {
- background-color: #ecf0f3;
- color: #222;
- /* padding: 1px 2px; */
-}
-
-tt.xref, a tt {
- background-color: #FBFBFB;
- border-bottom: 1px solid white;
-}
-
-a.reference {
- text-decoration: none;
- border-bottom: 1px dotted #004B6B;
-}
-
-a.reference:hover {
- border-bottom: 1px solid #6D4100;
-}
-
-a.footnote-reference {
- text-decoration: none;
- font-size: 0.7em;
- vertical-align: top;
- border-bottom: 1px dotted #004B6B;
-}
-
-a.footnote-reference:hover {
- border-bottom: 1px solid #6D4100;
-}
-
-a:hover tt {
- background: #EEE;
-}
-
-
-@media screen and (max-width: 600px) {
-
- div.sphinxsidebar {
- display: none;
- }
-
- div.documentwrapper {
- margin-left: 0;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- }
-
- div.bodywrapper {
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- }
-
- ul {
- margin-left: 0;
- }
-
- .document {
- width: auto;
- }
-
- .bodywrapper {
- margin: 0;
- }
-
- .footer {
- width: auto;
- }
-
-
-
-}
-
-
-/* scrollbars */
-
-::-webkit-scrollbar {
- width: 6px;
- height: 6px;
-}
-
-::-webkit-scrollbar-button:start:decrement,
-::-webkit-scrollbar-button:end:increment {
- display: block;
- height: 10px;
-}
-
-::-webkit-scrollbar-button:vertical:increment {
- background-color: #fff;
-}
-
-::-webkit-scrollbar-track-piece {
- background-color: #eee;
- -webkit-border-radius: 3px;
-}
-
-::-webkit-scrollbar-thumb:vertical {
- height: 50px;
- background-color: #ccc;
- -webkit-border-radius: 3px;
-}
-
-::-webkit-scrollbar-thumb:horizontal {
- width: 50px;
- background-color: #ccc;
- -webkit-border-radius: 3px;
-}
-
-/* misc. */
-
-.revsys-inline {
- display: none!important;
-} \ No newline at end of file
diff --git a/docs/_themes/kr/static/small_flask.css b/docs/_themes/kr/static/small_flask.css
deleted file mode 100644
index 1c6df30..0000000
--- a/docs/_themes/kr/static/small_flask.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * small_flask.css_t
- * ~~~~~~~~~~~~~~~~~
- *
- * :copyright: Copyright 2010 by Armin Ronacher.
- * :license: Flask Design License, see LICENSE for details.
- */
-
-body {
- margin: 0;
- padding: 20px 30px;
-}
-
-div.documentwrapper {
- float: none;
- background: white;
-}
-
-div.sphinxsidebar {
- display: block;
- float: none;
- width: 102.5%;
- margin: 50px -30px -20px -30px;
- padding: 10px 20px;
- background: #333;
- color: white;
-}
-
-div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
-div.sphinxsidebar h3 a {
- color: white;
-}
-
-div.sphinxsidebar a {
- color: #aaa;
-}
-
-div.sphinxsidebar p.logo {
- display: none;
-}
-
-div.document {
- width: 100%;
- margin: 0;
-}
-
-div.related {
- display: block;
- margin: 0;
- padding: 10px 0 20px 0;
-}
-
-div.related ul,
-div.related ul li {
- margin: 0;
- padding: 0;
-}
-
-div.footer {
- display: none;
-}
-
-div.bodywrapper {
- margin: 0;
-}
-
-div.body {
- min-height: 0;
- padding: 0;
-}
diff --git a/docs/_themes/kr/theme.conf b/docs/_themes/kr/theme.conf
deleted file mode 100644
index 307a1f0..0000000
--- a/docs/_themes/kr/theme.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = flasky.css
-pygments_style = flask_theme_support.FlaskyStyle
-
-[options]
-touch_icon =
diff --git a/docs/_themes/kr_small/layout.html b/docs/_themes/kr_small/layout.html
deleted file mode 100644
index aa1716a..0000000
--- a/docs/_themes/kr_small/layout.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% extends "basic/layout.html" %}
-{% block header %}
- {{ super() }}
- {% if pagename == 'index' %}
- <div class=indexwrapper>
- {% endif %}
-{% endblock %}
-{% block footer %}
- {% if pagename == 'index' %}
- </div>
- {% endif %}
-{% endblock %}
-{# do not display relbars #}
-{% block relbar1 %}{% endblock %}
-{% block relbar2 %}
- {% if theme_github_fork %}
- <a href="http://github.com/{{ theme_github_fork }}"><img style="position: fixed; top: 0; right: 0; border: 0;"
- src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
- {% endif %}
-{% endblock %}
-{% block sidebar1 %}{% endblock %}
-{% block sidebar2 %}{% endblock %}
diff --git a/docs/_themes/kr_small/static/flasky.css_t b/docs/_themes/kr_small/static/flasky.css_t
deleted file mode 100644
index fe2141c..0000000
--- a/docs/_themes/kr_small/static/flasky.css_t
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * flasky.css_t
- * ~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- flasky theme based on nature theme.
- *
- * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: 'Georgia', serif;
- font-size: 17px;
- color: #000;
- background: white;
- margin: 0;
- padding: 0;
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 40px auto 0 auto;
- width: 700px;
-}
-
-hr {
- border: 1px solid #B1B4B6;
-}
-
-div.body {
- background-color: #ffffff;
- color: #3E4349;
- padding: 0 30px 30px 30px;
-}
-
-img.floatingflask {
- padding: 0 0 10px 10px;
- float: right;
-}
-
-div.footer {
- text-align: right;
- color: #888;
- padding: 10px;
- font-size: 14px;
- width: 650px;
- margin: 0 auto 40px auto;
-}
-
-div.footer a {
- color: #888;
- text-decoration: underline;
-}
-
-div.related {
- line-height: 32px;
- color: #888;
-}
-
-div.related ul {
- padding: 0 0 0 10px;
-}
-
-div.related a {
- color: #444;
-}
-
-/* -- body styles ----------------------------------------------------------- */
-
-a {
- color: #004B6B;
- text-decoration: underline;
-}
-
-a:hover {
- color: #6D4100;
- text-decoration: underline;
-}
-
-div.body {
- padding-bottom: 40px; /* saved for footer */
-}
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- margin: 30px 0px 10px 0px;
- padding: 0;
-}
-
-{% if theme_index_logo %}
-div.indexwrapper h1 {
- text-indent: -999999px;
- background: url({{ theme_index_logo }}) no-repeat center center;
- height: {{ theme_index_logo_height }};
-}
-{% endif %}
-
-div.body h2 { font-size: 180%; }
-div.body h3 { font-size: 150%; }
-div.body h4 { font-size: 130%; }
-div.body h5 { font-size: 100%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
- color: white;
- padding: 0 4px;
- text-decoration: none;
-}
-
-a.headerlink:hover {
- color: #444;
- background: #eaeaea;
-}
-
-div.body p, div.body dd, div.body li {
- line-height: 1.4em;
-}
-
-div.admonition {
- background: #fafafa;
- margin: 20px -30px;
- padding: 10px 30px;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
-}
-
-div.admonition p.admonition-title {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- font-size: 24px;
- margin: 0 0 10px 0;
- padding: 0;
- line-height: 1;
-}
-
-div.admonition p.last {
- margin-bottom: 0;
-}
-
-div.highlight{
- background-color: white;
-}
-
-dt:target, .highlight {
- background: #FAF3E8;
-}
-
-div.note {
- background-color: #eee;
- border: 1px solid #ccc;
-}
-
-div.seealso {
- background-color: #ffc;
- border: 1px solid #ff6;
-}
-
-div.topic {
- background-color: #eee;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-p.admonition-title {
- display: inline;
-}
-
-p.admonition-title:after {
- content: ":";
-}
-
-pre, tt {
- font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
- font-size: 0.85em;
-}
-
-img.screenshot {
-}
-
-tt.descname, tt.descclassname {
- font-size: 0.95em;
-}
-
-tt.descname {
- padding-right: 0.08em;
-}
-
-img.screenshot {
- -moz-box-shadow: 2px 2px 4px #eee;
- -webkit-box-shadow: 2px 2px 4px #eee;
- box-shadow: 2px 2px 4px #eee;
-}
-
-table.docutils {
- border: 1px solid #888;
- -moz-box-shadow: 2px 2px 4px #eee;
- -webkit-box-shadow: 2px 2px 4px #eee;
- box-shadow: 2px 2px 4px #eee;
-}
-
-table.docutils td, table.docutils th {
- border: 1px solid #888;
- padding: 0.25em 0.7em;
-}
-
-table.field-list, table.footnote {
- border: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-
-table.footnote {
- margin: 15px 0;
- width: 100%;
- border: 1px solid #eee;
-}
-
-table.field-list th {
- padding: 0 0.8em 0 0;
-}
-
-table.field-list td {
- padding: 0;
-}
-
-table.footnote td {
- padding: 0.5em;
-}
-
-dl {
- margin: 0;
- padding: 0;
-}
-
-dl dd {
- margin-left: 30px;
-}
-
-pre {
- padding: 0;
- margin: 15px -30px;
- padding: 8px;
- line-height: 1.3em;
- padding: 7px 30px;
- background: #eee;
- border-radius: 2px;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
-}
-
-dl pre {
- margin-left: -60px;
- padding-left: 60px;
-}
-
-tt {
- background-color: #ecf0f3;
- color: #222;
- /* padding: 1px 2px; */
-}
-
-tt.xref, a tt {
- background-color: #FBFBFB;
-}
-
-a:hover tt {
- background: #EEE;
-}
diff --git a/docs/_themes/kr_small/theme.conf b/docs/_themes/kr_small/theme.conf
deleted file mode 100644
index 542b462..0000000
--- a/docs/_themes/kr_small/theme.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = flasky.css
-nosidebar = true
-pygments_style = flask_theme_support.FlaskyStyle
-
-[options]
-index_logo = ''
-index_logo_height = 120px
-github_fork = ''
diff --git a/docs/api/rest.rst b/docs/api/rest.rst
deleted file mode 100644
index 172fa98..0000000
--- a/docs/api/rest.rst
+++ /dev/null
@@ -1,872 +0,0 @@
-.. _api-rest:
-
-###############################
-Twilio Rest Resources
-###############################
-
-**************
-List Resources
-**************
-
-.. phpautoclass:: Services_Twilio_ListResource
- :filename: ../Services/Twilio/ListResource.php
- :members:
-
-All of the below classes inherit from the :php:class:`ListResource
-<Services_Twilio_ListResource>`.
-
-Accounts
-===========
-
-.. phpautoclass:: Services_Twilio_Rest_Accounts
- :filename: ../Services/Twilio/Rest/Accounts.php
- :members:
-
-AvailablePhoneNumbers
-========================
-
-.. php:class:: Services_Twilio_Rest_AvailablePhoneNumbers
-
- For more information, see the `AvailablePhoneNumbers API Resource <http://www.twilio.com/docs/api/rest/available-phone-numbers#local>`_ documentation at twilio.com.
-
- .. php:method:: getList($country, $type)
-
- Get a list of available phone numbers.
-
- :param string country: The 2-digit country code for numbers ('US', 'GB',
- 'CA')
- :param string type: The type of phone number ('TollFree' or 'Local')
- :return: An instance of the :php:class:`Services_Twilio_Rest_AvailablePhoneNumbers` resource.
-
- .. php:attr:: available_phone_numbers
-
- A list of :php:class:`Services_Twilio_Rest_AvailablePhoneNumber` instances.
-
- .. php:attr:: uri
-
- The uri representing this resource, relative to https://api.twilio.com.
-
-
-Calls
-=======
-
-.. php:class:: Services_Twilio_Rest_Calls
-
- For more information, see the `Call List Resource <http://www.twilio.com/docs/api/rest/call#list>`_ documentation.
-
- .. php:method:: create($from, $to, $url, params = array())
-
- Make an outgoing call
-
- :param string $from: The phone number to use as the caller id.
- :param string $to: The number to call formatted with a '+' and country code
- :param string $url: The fully qualified URL that should be consulted when
- the call connects. This value can also be an ApplicationSid.
- :param array $params: An array of optional parameters for this call
-
- The **$params** array can contain the following keys:
-
- *Method*
- The HTTP method Twilio should use when making its request to the above Url parameter's value. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
-
- *FallbackUrl*
- A URL that Twilio will request if an error occurs requesting or executing the TwiML at Url. If an ApplicationSid parameter is present, this parameter is ignored.
-
- *FallbackMethod*
- The HTTP method that Twilio should use to request the FallbackUrl. Must be either GET or POST. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
-
- *StatusCallback*
- A URL that Twilio will request when the call ends to notify your app. If an ApplicationSid parameter is present, this parameter is ignored.
-
- *StatusCallbackMethod*
- The HTTP method Twilio should use when requesting the above URL. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
-
- *SendDigits*
- A string of keys to dial after connecting to the number. Valid digits in the string include: any digit (0-9), '#' and '*'. For example, if you connected to a company phone number, and wanted to dial extension 1234 and then the pound key, use SendDigits=1234#. Remember to URL-encode this string, since the '#' character has special meaning in a URL.
-
- *IfMachine*
- Tell Twilio to try and determine if a machine (like voicemail) or a human has answered the call. Possible values are Continue and Hangup. See the answering machines section below for more info.
-
- *Timeout*
- The integer number of seconds that Twilio should allow the phone to ring before assuming there is no answer. Default is 60 seconds, the maximum is 999 seconds. Note, you could set this to a low value, such as 15, to hangup before reaching an answering machine or voicemail.
-
-CredentialListMappings
-=========================
-
-.. phpautoclass:: Services_Twilio_Rest_CredentialListMappings
- :filename: ../Services/Twilio/Rest/CredentialListMappings.php
- :members:
-
-
-CredentialLists
-=================
-
-.. phpautoclass:: Services_Twilio_Rest_CredentialLists
- :filename: ../Services/Twilio/Rest/CredentialLists.php
- :members:
-
-Credentials
-==============
-
-.. phpautoclass:: Services_Twilio_Rest_Credentials
- :filename: ../Services/Twilio/Rest/Credentials.php
- :members:
-
-Domains
-==========
-
-.. phpautoclass:: Services_Twilio_Rest_Domains
- :filename: ../Services/Twilio/Rest/Domains.php
- :members:
-
-
-IncomingPhoneNumbers
-========================
-
-.. phpautoclass:: Services_Twilio_Rest_IncomingPhoneNumbers,Services_Twilio_Rest_Local,Services_Twilio_Rest_Mobile,Services_Twilio_Rest_TollFree
- :filename: ../Services/Twilio/Rest/IncomingPhoneNumbers.php
- :members:
-
-IpAccessControlListMappings
-==============================
-
-.. phpautoclass:: Services_Twilio_Rest_IpAccessControlListMappings
- :filename: ../Services/Twilio/Rest/IpAccessControlListMappings.php
- :members:
-
-IpAccessControlLists
-=======================
-
-.. phpautoclass:: Services_Twilio_Rest_IpAccessControlLists
- :filename: ../Services/Twilio/Rest/IpAccessControlLists.php
- :members:
-
-IpAddresses
-=======================
-
-.. phpautoclass:: Services_Twilio_Rest_IpAddresses
- :filename: ../Services/Twilio/Rest/IpAddresses.php
- :members:
-
-Media
-======
-
-.. phpautoclass:: Services_Twilio_Rest_Media
- :filename: ../Services/Twilio/Rest/Media.php
- :members:
-
-Members
-===========
-
-.. php:class:: Services_Twilio_Rest_Members
-
- For more information, including a list of filter parameters, see the `Member List Resource <http://www.twilio.com/docs/api/rest/member#list>`_ documentation.
-
- .. php:method:: front()
-
- Return the :php:class:`Services_Twilio_Rest_Member` at the front of the
- queue.
-
-Messages
-========
-
-.. phpautoclass:: Services_Twilio_Rest_Messages
- :filename: ../Services/Twilio/Rest/Messages.php
- :members:
-
-Queues
-===========
-
-.. php:class:: Services_Twilio_Rest_Queues
-
- For more information, including a list of filter parameters, see the
- `Queues List Resource <http://www.twilio.com/docs/api/rest/queues#list>`_
- documentation.
-
- .. php:method:: create($friendly_name, $params = array())
-
- Create a new :php:class:`Services_Twilio_Rest_Queue`.
-
- :param string $friendly_name: The name of the new Queue.
- :param array $params: An array of optional parameters and their values,
- like `MaxSize`.
- :returns: A new :php:class:`Services_Twilio_Rest_Queue`
-
-
-UsageRecords
-==============
-
-.. php:class:: Services_Twilio_Rest_UsageRecords
-
- For more information, including a list of filter parameters, see the `UsageRecords List Resource <http://www.twilio.com/docs/api/rest/usage-records#list>`_ documentation.
-
- .. php:method:: getCategory($category)
-
- Return the single UsageRecord corresponding to this category of usage.
- Valid only for the `Records`, `Today`, `Yesterday`, `ThisMonth`,
- `LastMonth` and `AllTime` resources.
-
- :param string $category: The category to retrieve a usage record for. For a full list of valid categories, see the full `Usage Category documentation <http://www.twilio.com/docs/api/rest/usage-records#usage-all-categories>`_.
- :returns: :php:class:`Services_Twilio_Rest_UsageRecord` A single usage record
-
-UsageTriggers
-=============
-
-.. php:class:: Services_Twilio_Rest_UsageTriggers
-
- For more information, including a list of filter parameters, see the `UsageTriggers List Resource <http://www.twilio.com/docs/api/rest/usage-triggers#list>`_ documentation.
-
- .. php:method:: create($category, $value, $url, $params = array())
-
- Create a new UsageTrigger.
-
- :param string $category: The category of usage to fire a trigger for. A full list of categories can be found in the `Usage Categories documentation <http://www.twilio.com/docs/api/rest/usage-records#usage-categories>`_.
- :param string $value: Fire the trigger when usage crosses this value.
- :param string $url: The URL to request when the trigger fires.
- :param array $params: Optional parameters for this trigger. A full list of parameters can be found in the `Usage Trigger documentation <http://www.twilio.com/docs/api/rest/usage-triggers#list-post-optional-parameters>`_.
- :returns: :php:class:`Services_Twilio_Rest_UsageTrigger` The created trigger.
-
-
-********************
-Instance Resources
-********************
-
-.. phpautoclass:: Services_Twilio_InstanceResource
- :filename: ../Services/Twilio/InstanceResource.php
- :members:
-
-Below you will find a list of objects created by interacting with the Twilio
-API, and the methods and properties that can be called on them. These are
-derived from the :php:class:`ListResource <Services_Twilio_ListResource>` and
-:php:class:`InstanceResource <Services_Twilio_InstanceResource>` above.
-
-
-Account
-========
-
-.. php:class:: Services_Twilio_Rest_Account
-
- For more information, see the `Account Instance Resource <http://www.twilio.com/docs/api/rest/account#instance>`_ documentation.
-
- .. php:method:: update($params)
-
- Update the account
-
- The **$params** array is the same as in :php:meth:`Services_Twilio_Rest_Accounts::create`
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this account.
-
- .. php:attr:: date_created
-
- The date that this account was created, in GMT in RFC 2822 format
-
- .. php:attr:: date_updated
-
- The date that this account was last updated, in GMT in RFC 2822 format.
-
- .. php:attr:: friendly_name
-
- A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.
-
- .. php:attr:: status
-
- The status of this account. Usually active, but can be suspended if you've been bad, or closed if you've been horrible.
-
- .. php:attr:: auth_token
-
- The authorization token for this account. This token should be kept a secret, so no sharing.
-
-Application
-===========
-
-.. php:class:: Services_Twilio_Rest_Application
-
- For more information, see the `Application Instance Resource <http://www.twilio.com/docs/api/rest/applications#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely idetifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given as GMT RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given as GMT RFC 2822 format.
-
- .. php:attr:: friendly_name
-
- A human readable descriptive text for this resource, up to 64 characters long. By default, the FriendlyName is a nicely formatted version of the phone number.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for this phone number.
-
- .. php:attr:: api_version
-
- Calls to this phone number will start a new TwiML session with this API version.
-
- .. php:attr:: voice_caller_id_lookup
-
- Look up the caller's caller-ID name from the CNAM database (additional charges apply). Either true or false.
-
- .. php:attr:: voice_url
-
- The URL Twilio will request when this phone number receives a call.
-
- .. php:attr:: voice_method
-
- The HTTP method Twilio will use when requesting the above Url. Either GET or POST.
-
- .. php:attr:: voice_fallback_url
-
- The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url.
-
- .. php:attr:: voice_fallback_method
-
- The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.
-
- .. php:attr:: status_callback
-
- The URL that Twilio will request to pass status parameters (such as call ended) to your application.
-
- .. php:attr:: status_callback_method
-
- The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.
-
- .. php:attr:: sms_url
-
- The URL Twilio will request when receiving an incoming SMS message to this number.
-
- .. php:attr:: sms_method
-
- The HTTP method Twilio will use when making requests to the SmsUrl. Either GET or POST.
-
- .. php:attr:: sms_fallback_url
-
- The URL that Twilio will request if an error occurs retrieving or executing the TwiML from SmsUrl.
-
- .. php:attr:: sms_fallback_method
-
- The HTTP method Twilio will use when requesting the above URL. Either GET or POST.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com.
-
-AvailablePhoneNumber
-========================
-
-.. php:class:: Services_Twilio_Rest_AvailablePhoneNumber
-
- For more information, see the `AvailablePhoneNumber Instance Resource <http://www.twilio.com/docs/api/rest/available-phone-numbers#instance>`_ documentation.
-
- .. php:attr:: friendly_name
-
- A nicely-formatted version of the phone number.
-
- .. php:attr:: phone_number
-
- The phone number, in E.164 (i.e. "+1") format.
-
- .. php:attr:: lata
-
- The LATA of this phone number.
-
- .. php:attr:: rate_center
-
- The rate center of this phone number.
-
- .. php:attr:: latitude
-
- The latitude coordinate of this phone number.
-
- .. php:attr:: longitude
-
- The longitude coordinate of this phone number.
-
- .. php:attr:: region
-
- The two-letter state or province abbreviation of this phone number.
-
- .. php:attr:: postal_code
-
- The postal (zip) code of this phone number.
-
- .. php:attr:: iso_country
-
-Call
-====
-
-.. phpautoclass:: Services_Twilio_Rest_Call
- :filename: ../Services/Twilio/Rest/Call.php
- :members:
-
-CallerId
-============
-
-.. php:class:: Services_Twilio_Rest_OutgoingCallerId
-
- For more information, see the `OutgoingCallerId Instance Resource <http://www.twilio.com/docs/api/rest/outgoing-caller-ids#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: friendly_name
-
- A human readable descriptive text for this resource, up to 64 characters long. By default, the FriendlyName is a nicely formatted version of the phone number.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for this Caller Id.
-
- .. php:attr:: phone_number
-
- The incoming phone number. Formatted with a '+' and country code e.g., +16175551212 (E.164 format).
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com.
-
-Conference
-=============
-
-.. php:class:: Services_Twilio_Rest_Conference
-
- For more information, see the `Conference Instance Resource <http://www.twilio.com/docs/api/rest/conference#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this conference.
-
- .. php:attr:: friendly_name
-
- A user provided string that identifies this conference room.
-
- .. php:attr:: status
-
- A string representing the status of the conference. May be init, in-progress, or completed.
-
- .. php:attr:: date_created
-
- The date that this conference was created, given as GMT in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this conference was last updated, given as GMT in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for creating this conference.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com.
-
- .. php:attr:: participants
-
- The :php:class:`Services_Twilio_Rest_Participants` instance, listing people currently in this conference
-
-CredentialListMapping
-=========================
-
-.. phpautoclass:: Services_Twilio_Rest_CredentialListMapping
- :filename: ../Services/Twilio/Rest/CredentialListMapping.php
- :members:
-
-
-CredentialList
-=================
-
-.. phpautoclass:: Services_Twilio_Rest_CredentialList
- :filename: ../Services/Twilio/Rest/CredentialList.php
- :members:
-
-Credential
-==============
-
-.. phpautoclass:: Services_Twilio_Rest_Credential
- :filename: ../Services/Twilio/Rest/Credential.php
- :members:
-
-Domain
-==========
-
-.. phpautoclass:: Services_Twilio_Rest_Domain
- :filename: ../Services/Twilio/Rest/Domain.php
- :members:
-
-IncomingPhoneNumber
-===================
-
-.. phpautoclass:: Services_Twilio_Rest_IncomingPhoneNumber
- :filename: ../Services/Twilio/Rest/IncomingPhoneNumber.php
- :members:
-
-IpAccessControlListMapping
-==============================
-
-.. phpautoclass:: Services_Twilio_Rest_IpAccessControlListMapping
- :filename: ../Services/Twilio/Rest/IpAccessControlListMapping.php
- :members:
-
-IpAccessControlList
-=======================
-
-.. phpautoclass:: Services_Twilio_Rest_IpAccessControlList
- :filename: ../Services/Twilio/Rest/IpAccessControlList.php
- :members:
-
-IpAddress
-==============
-.. phpautoclass:: Services_Twilio_Rest_IpAddress
- :filename: ../Services/Twilio/Rest/IpAddress.php
- :members:
-
-
-Notification
-=============
-
-.. php:class:: Services_Twilio_Rest_Notification
-
- For more information, see the `Notification Instance Resource <http://www.twilio.com/docs/api/rest/notification#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for this notification.
-
- .. php:attr:: call_sid
-
- CallSid is the unique id of the call during which the notification was generated. Empty if the notification was generated by the REST API without regard to a specific phone call.
-
- .. php:attr:: api_version
-
- The version of the Twilio in use when this notification was generated.
-
- .. php:attr:: log
-
- An integer log level corresponding to the type of notification: 0 is ERROR, 1 is WARNING.
-
- .. php:attr:: error_code
-
- A unique error code for the error condition. You can lookup errors, with possible causes and solutions, in our `Error Dictionary <http://www.twilio.com/docs/errors/reference>`_.
-
- .. php:attr:: more_info
-
- A URL for more information about the error condition. The URL is a page in our `Error Dictionary <http://www.twilio.com/docs/errors/reference>`_.
-
- .. php:attr:: message_text
-
- The text of the notification.
-
- .. php:attr:: message_date
-
- The date the notification was actually generated, given in RFC 2822
- format. Due to buffering, this may be slightly different than the
- DateCreated date.
-
- .. php:attr:: request_url
-
- The URL of the resource that generated the notification. If the
- notification was generated during a phone call: This is the URL of the
- resource on YOUR SERVER that caused the notification. If the notification
- was generated by your use of the REST API: This is the URL of the REST
- resource you were attempting to request on Twilio's servers.
-
- .. php:attr:: request_method
-
- The HTTP method in use for the request that generated the notification. If
- the notification was generated during a phone call: The HTTP Method use to
- request the resource on your server. If the notification was generated by
- your use of the REST API: This is the HTTP method used in your request to
- the REST resource on Twilio's servers.
-
- .. php:attr:: request_variables
-
- The Twilio-generated HTTP GET or POST variables sent to your server. Alternatively, if the notification was generated by the REST API, this field will include any HTTP POST or PUT variables you sent to the REST API.
-
- .. php:attr:: response_headers
-
- The HTTP headers returned by your server.
-
- .. php:attr:: response_body
-
- The HTTP body returned by your server.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com
-
-Media
-=======
-
-.. phpautoclass:: Services_Twilio_Rest_MediaInstance
- :filename: ../Services/Twilio/Rest/MediaInstance.php
- :members:
-
-Member
-=======
-
-.. php:class:: Services_Twilio_Rest_Member
-
- For more information about available properties, see the `Member Instance Resource <http://www.twilio.com/docs/api/rest/member#instance>`_ documentation.
-
- .. php:method:: dequeue($url, $method = 'POST')
-
- Dequeue this member and immediately play the Twiml at the given ``$url``.
-
- :param string $url: The Twiml URL to play for this member, after dequeuing them
- :param string $method: The HTTP method to use when fetching the Twiml URL. Defaults to POST.
- :return: The dequeued member
- :rtype: :php:class:`Member <Services_Twilio_Rest_Member>`
-
-
-Participant
-=============
-
-.. php:class:: Services_Twilio_Rest_Participant
-
- For more information, see the `Participant Instance Resource <http://www.twilio.com/docs/api/rest/participant#instance>`_ documentation.
-
- .. php:attr:: call_sid
-
- A 34 character string that uniquely identifies the call that is connected to this conference
-
- .. php:attr:: conference_sid
-
- A 34 character string that identifies the conference this participant is in
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account that created this conference
-
- .. php:attr:: muted
-
- true if this participant is currently muted. false otherwise.
-
- .. php:attr:: start_conference_on_enter
-
- Was the startConferenceOnEnter attribute set on this participant (true or false)?
-
- .. php:attr:: end_conference_on_exit
-
- Was the endConferenceOnExit attribute set on this participant (true or false)?
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com.
-
-Queue
-============
-
-.. php:class:: Services_Twilio_Rest_Queue
-
- For more information about available properties of a queue, see the `Queue
- Instance Resource <http://www.twilio.com/docs/api/rest/queue#instance>`_
- documentation. A Queue has one subresource, a list of
- :php:class:`Services_Twilio_Rest_Members`.
-
-Recording
-=============
-
-.. php:class:: Services_Twilio_Rest_Recording
-
- For more information, see the `Recording Instance Resource <http://www.twilio.com/docs/api/rest/recording#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for this recording.
-
- .. php:attr:: call_sid
-
- The call during which the recording was made.
-
- .. php:attr:: duration
-
- The length of the recording, in seconds.
-
- .. php:attr:: api_version
-
- The version of the API in use during the recording.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com
-
- .. php:attr:: subresource_uris
-
- The list of subresources under this account
-
- .. php:attr:: formats
-
- A dictionary of the audio formats available for this recording
-
- .. code-block:: php
-
- array(
- 'wav' => 'https://api.twilio.com/path/to/recording.wav',
- 'mp3' => 'https://api.twilio.com/path/to/recording.mp3',
- )
-
-Message
-=======
-
-.. phpautoclass:: Services_Twilio_Rest_Message
- :filename: ../Services/Twilio/Rest/Message.php
- :members:
-
-SmsMessage
-===========
-
-.. php:class:: Services_Twilio_Rest_SmsMessage
-
- For more information, see the `SMS Message Instance Resource <http://www.twilio.com/docs/api/rest/sms#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: date_sent
-
- The date that the SMS was sent, given in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account that sent this SMS message.
-
- .. php:attr:: from
-
- The phone number that initiated the message in E.164 format. For incoming messages, this will be the remote phone. For outgoing messages, this will be one of your Twilio phone numbers.
-
- .. php:attr:: to
-
- The phone number that received the message in E.164 format. For incoming messages, this will be one of your Twilio phone numbers. For outgoing messages, this will be the remote phone.
-
- .. php:attr:: body
-
- The text body of the SMS message. Up to 160 characters long.
-
- .. php:attr:: status
-
- The status of this SMS message. Either queued, sending, sent, or failed.
-
- .. php:attr:: direction
-
- The direction of this SMS message. ``incoming`` for incoming messages,
- ``outbound-api`` for messages initiated via the REST API, ``outbound-call`` for
- messages initiated during a call or ``outbound-reply`` for messages initiated in
- response to an incoming SMS.
-
- .. php:attr:: price
-
- The amount billed for the message.
-
- .. php:attr:: api_version
-
- The version of the Twilio API used to process the SMS message.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com
-
-
-Transcription
-==================
-
-.. php:class:: Services_Twilio_Rest_Transcription
-
- For more information, see the `Transcription Instance Resource <http://www.twilio.com/docs/api/rest/transcription#instance>`_ documentation.
-
- .. php:attr:: sid
-
- A 34 character string that uniquely identifies this resource.
-
- .. php:attr:: date_created
-
- The date that this resource was created, given in RFC 2822 format.
-
- .. php:attr:: date_updated
-
- The date that this resource was last updated, given in RFC 2822 format.
-
- .. php:attr:: account_sid
-
- The unique id of the Account responsible for this transcription.
-
- .. php:attr:: status
-
- A string representing the status of the transcription: ``in-progress``, ``completed`` or ``failed``.
-
- .. php:attr:: recording_sid
-
- The unique id of the Recording this Transcription was made of.
-
- .. php:attr:: duration
-
- The duration of the transcribed audio, in seconds.
-
- .. php:attr:: transcription_text
-
- The text content of the transcription.
-
- .. php:attr:: price
-
- The charge for this transcript in USD. Populated after the transcript is completed. Note, this value may not be immediately available.
-
- .. php:attr:: uri
-
- The URI for this resource, relative to https://api.twilio.com
-
-
diff --git a/docs/api/services.rst b/docs/api/services.rst
deleted file mode 100644
index a69f212..0000000
--- a/docs/api/services.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################
-HTTP Helper Classes
-###############################
-
-**********************
-The Twilio Rest Client
-**********************
-
-.. phpautoclass:: Services_Twilio
- :filename: ../Services/Twilio.php
- :members:
-
-***************************
-Twilio's Custom HTTP Client
-***************************
-
-.. phpautoclass:: Services_Twilio_TinyHttp
- :filename: ../Services/Twilio/TinyHttp.php
- :members:
-
-***********************
-Twilio Rest Exceptions
-***********************
-.. phpautoclass:: Services_Twilio_RestException
- :filename: ../Services/Twilio/RestException.php
- :members:
diff --git a/docs/api/taskrouter.rst b/docs/api/taskrouter.rst
deleted file mode 100644
index 45fda65..0000000
--- a/docs/api/taskrouter.rst
+++ /dev/null
@@ -1,762 +0,0 @@
-.. _api-taskrouter:
-
-######################
-Twilio TaskRouter API
-######################
-
-**************
-List Resources
-**************
-
-.. phpautoclass:: Services_Twilio_ListResource
- :filename: ../Services/Twilio/ListResource.php
- :members:
-
-All of the below classes inherit from the :php:class:`ListResource
-<Services_Twilio_ListResource>`.
-
-
-Workspaces
-====================
-.. php:class:: Services_Twilio_Rest_TaskRouter_Workspaces
-
- For more information, see the Workspaces API Resource https://www.twilio.com/docs/taskrouter/workspaces
-
- .. php:method:: create($friendlyName, array $params = array())
-
- Make a workspace
-
- :param string $friendlyName: String representing a user-friendly name for the Workspace
- :param array $params: An array of optional parameters for this call
-
- The **$params** array can contain the following keys:
-
- *EventCallbackUrl*
- If provided, the Workspace will publish events to this URL. You can use this to gather data for reporting.
-
- *Template*
- One of the available template names. Will pre-configure this Workspace with the Workflow and Activities specified in the template. “NONE” will create a Workspace with a set of default activities and nothing else. "FIFO" will configure TaskRouter with a set of default activities and a single task queue for first-in, first-out distribution, useful if you want to see a simple TaskRouter configuration when getting started.
-
-
-Workflows
-====================
-.. php:class:: Services_Twilio_Rest_TaskRouter_Workflows
-
- For more information, see the Workflows API Resource https://www.twilio.com/docs/taskrouter/workflows
-
- .. php:method:: create($friendlyName, $configuration, $assignmentCallbackUrl, array $params = array())
-
- Make a workflow
-
- :param string $friendlyName: String representing a user-friendly name for the Workflow
- :param string $configuration: JSON document configuring the rules for this Workflow
- :param string $assignmentCallbackUrl: A valid URL for the application that will process task assignment events
- :param array $params: An array of optional parameters for this call
-
- The **$params** array **must** contain a TaskReservationTimeout, but FallbackAssignmentCallbackUrl is **optional**.
-
- *FallbackAssignmentCallbackUrl*
- If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL
-
- *TaskReservationTimeout*
- An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker
-
-
-Workers
-====================
-.. php:class:: Services_Twilio_Rest_TaskRouter_Workers
-
- For more information, see the Workers API Resource https://www.twilio.com/docs/taskrouter/workers
-
- .. php:method:: create($friendlyName, array $params = array())
-
- Make a worker
-
- :param string $friendlyName: String representing a user-friendly name for the Worker
- :param array $params: An array of optional parameters for this call
-
- The **$params** array can contain the following keys:
-
- *ActivitySid*
- A valid Activity describing the worker's initial state
-
- *Attributes*
- JSON object describing this worker
-
-
-TaskQueues
-====================
-.. php:class:: Services_Twilio_Rest_TaskRouter_TaskQueues
-
- For more information, see the TaskQueues API Resource https://www.twilio.com/docs/taskrouter/taskqueues
-
- .. php:method:: create($friendlyName, $assignmentActivitySid, $reservationActivitySid, array $params = array())
-
- Make a task queue
-
- :param string $friendlyName: String representing a user-friendly name for the Task Queue
- :param string $assignmentActivitySid: The activity to assign a worker when they accept a Task from this TaskQueue; defaults to 'Busy'
- :param string $reservationActivitySid: The Activity to assign a Worker when they are reserved for a Task from this TaskQueue; defaults to 'Reserved'
- :param array $params: An array of optional parameters for this call
-
- The **$params** array can contain the following keys:
-
- *TargetWorkers*
- A string describing the Worker selection criteria for any Tasks that enter this TaskQueue
-
- *MaxReservedWorkers*
- The maximum amount of workers to create reservations for the assignment of a task while in this queue; default = 1, max = 50
-
-
-Tasks
-====================
-.. php:class:: Services_Twilio_Rest_TaskRouter_Tasks
-
- For more information, see the Tasks API Resource https://www.twilio.com/docs/taskrouter/tasks
-
- .. php:method:: create($attributes, $workflowSid, array $params = array())
-
- Make a task
-
- :param string $attributes: The user-defined JSON string describing the custom attributes of this work
- :param string $workflowSid: The ID of the Workflow responsible for routing this Task
- :param array $params: An array of optional parameters for this call
-
- The **$params** array can contain the following keys:
-
- *Timeout*
- The amount of time in seconds the task is allowed to live; default = 24 hours
-
- *Priority*
- Override priority for the Task
-
-
-Activities
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Activities
-
- For more information, see the Activities API Resource https://www.twilio.com/docs/taskrouter/activities documentation
-
- .. php:method:: create($friendlyName, $available)
-
- Make an activity
-
- :param string $friendlyName: String representing a user-friendly name for the Activity
- :param string $available: Boolean value indicating whether the worker should be eligible to receive a Task when they occupy this Activity
-
-
-Events
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Events
-
- For more information, see the Events API Resource https://www.twilio.com/docs/taskrouter/events documentation
-
-
-Reservations
-=======================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Reservations
-
- For more information, see the Task Reservation Instance Subresource section on https://www.twilio.com/docs/taskrouter/tasks documentation
-
-
-Workers Statistics
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_WorkersStatistics
-
- For more information, see the Worker Statistics API Resource https://www.twilio.com/docs/taskrouter/worker-statistics documentation
-
-
-TaskQueue Statistics
-======================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_TaskQueuesStatistics
-
- For more information, see the TaskQueue Statistics API Resource https://www.twilio.com/docs/taskrouter/taskqueue-statistics documentation
-
-********************
-Instance Resources
-********************
-
-.. phpautoclass:: Services_Twilio_InstanceResource
- :filename: ../Services/Twilio/InstanceResource.php
- :members:
-
-Below you will find a list of objects created by interacting with the Twilio
-API, and the methods and properties that can be called on them. These are
-derived from the :php:class:`ListResource <Services_Twilio_ListResource>` and
-:php:class:`InstanceResource <Services_Twilio_InstanceResource>` above.
-
-
-Workspace
-====================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Workspace
-
- .. php:attr:: sid
-
- The unique ID of the Workspace
-
- .. php:attr:: account_sid
-
- The ID of the account that owns this Workflow
-
- .. php:attr:: friendly_name
-
- Human readable description of this workspace (for example “Sales Call Center” or “Customer Support Team”)
-
- .. php:attr:: default_activity_sid
-
- The ID of the Activity that will be used when new Workers are created in this Workspace.
-
- .. php:attr:: default_activity_name
-
- The human readable name of the default activity. Read only.
-
- .. php:attr:: timeout_activity_sid
-
- The ID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
-
- .. php:attr:: timeout_activity_name
-
- The human readable name of the timeout activity. Read only.
-
- .. php:attr:: event_callback_url
-
- An optional URL where the Workspace will publish events. You can use this to gather data for reporting. See Workspace Events for more information. Optional.
-
- .. php:attr:: date_created
-
- The time the Workspace was created, given as GMT in ISO 8601 format.
-
- .. php:attr:: date_updated
-
- The time the Workspace was last updated, given as GMT in ISO 8601 format.
-
-
-Workflow
-================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Workflow
-
- .. php:attr:: sid
-
- The unique ID of the Workflow
-
- .. php:attr:: account_sid
-
- The ID of the account that owns this Workflow
-
- .. php:attr:: workspace_sid
-
- The ID of the Workspace that contains this Workflow
-
- .. php:attr:: friendly_name
-
- Human readable description of this Workflow (for example “Customer Support” or “2014 Election Campaign”)
-
- .. php:attr:: assignment_callback_url
-
- The URL that will be called whenever a task managed by this Workflow is assigned to a Worker.
-
- .. php:attr:: fallback_assignment_callback_url
-
- If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
-
- .. php:attr:: configuration
-
- JSON document configuring the rules for this Workflow. See Configuring Workflows for more information.
-
- .. php:attr:: task_reservation_timeout
-
- Determines how long TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker. Defaults to 120 seconds.
-
- .. php:attr:: date_created
-
- The date this workflow was created.
-
- .. php:attr:: date_updated
-
- The date this workflow was updated.
-
-Worker
-================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Worker
-
- .. php:attr:: friendly_name
-
- Filter by a worker’s friendly name
-
- .. php:attr:: task_queue_sid
-
- Filter by workers that are eligible for a TaskQueue by SID
-
- .. php:attr:: task_queue_name
-
- Filter by workers that are eligible for a TaskQueue by Friendly Name
-
- .. php:attr:: activity_sid
-
- Filter by workers that are in a particular Activity by SID
-
- .. php:attr:: activity_name
-
- Filter by workers that are in a particular Activity by Friendly Name
-
- .. php:attr:: available
-
- Filter by workers that are available or unavailable. (Note: This can be ‘true’, ‘1’’ or ‘yes’ to indicate a true value. All other values will represent false)
-
- .. php:attr:: target_workers_expression
-
- Filter by workers that would match an expression on a TaskQueue. This is helpful for debugging which workers would match a potential queue.
-
-
-TaskQueue
-================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_TaskQueue
-
- .. php:attr:: sid
-
- The unique ID of the TaskQueue
-
- .. php:attr:: account_sid
-
- The ID of the Account that owns this TaskQueue
-
- .. php:attr:: workspace_sid
-
- The ID of the Workspace that owns this TaskQueue
-
- .. php:attr:: friendly_name
-
- Human readable description of the TaskQueue (for example “Customer Support” or “Sales”)
-
- .. php:attr:: target_workers
-
- The worker selection expressions associated with this TaskQueue.
-
- .. php:attr:: reservation_activity_sid
-
- The Activity to assign a Worker when they are reserved for a Task from this TaskQueue. Defaults to 'Reserved for Task'
-
- .. php:attr:: assignment_activity_sid
-
- The Activity to assign a Worker when they accept a Task from this TaskQueue. Defaults to 'Unavailable for Assignment'.
-
- .. php:attr:: max_reserved_workers
-
- The maximum amount of workers to create reservations for the assignment of a task while in this queue.
-
-Task
-====================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Task
-
- .. php:attr:: sid
-
- The unique ID of the Task
-
- .. php:attr:: account_sid
-
- The ID of the account that owns this Task
-
- .. php:attr:: workspace_sid
-
- The ID of the Workspace that holds this Task
-
- .. php:attr:: workflow_sid
-
- The ID of the Workflow responsible for routing this Task
-
- .. php:attr:: attributes
-
- The user-defined JSON string describing the custom attributes of this work.
-
- .. php:attr:: age
-
- The number of seconds since this task was created.
-
- .. php:attr:: priority
-
- The current priority score of the task, as assigned by the workflow. Tasks with higher values will be assigned before tasks with lower values.
-
- .. php:attr:: task_queue_sid
-
- The current TaskQueue occupied, controlled by the Workflow's Workflow.
-
- .. php:attr:: assignment_status
-
- A string representing the Assignment State of the task. May be pending, reserved, assigned or canceled. See the table of Task Assignment Status values below for more information.
-
- .. php:attr:: reason
-
- The reason the task was canceled (if applicable)
-
- .. php:attr:: date_created
-
- Date this task was created, given as ISO 8601 format.
-
- .. php:attr:: date_updated
-
- Date this task was updated, given as ISO 8601 format.
-
- .. php:attr:: timeout
-
- The amount of time in seconds the task is allowed to live
-
-Activity
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Activity
-
- .. php:attr:: sid
-
- The unique ID for this Activity.
-
- .. php:attr:: account_sid
-
- The unique ID of the Account that owns this Activity.
-
- .. php:attr:: workspace_sid
-
- The unique ID of the Workspace that this Activity belongs to.
-
- .. php:attr:: friendly_name
-
- A human-readable name for the Activity, such as 'on-call', 'break', 'email', etc. These names will be used to calculate and expose statistics about workers, and give you visibility into the state of each of your workers.
-
- .. php:attr:: available
-
- Boolean value indicating whether the worker should be eligible to receive a Task when they occupy this Activity. For example, in an activity called 'On Call', the worker would be unavailable to receive additional Task assignments.
-
- .. php:attr:: date_created
-
- The date this Activity was created.
-
- .. php:attr:: date_updated
-
- The date this Activity was updated.
-
-Event
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Event
-
- .. php:attr:: event_type
-
- An identifier for this event
-
- .. php:attr:: account_sid
-
- The account owning this event
-
- .. php:attr:: description
-
- A description of the event
-
- .. php:attr:: resource_type
-
- The type of object this event is most relevant to (Task, Reservation, Worker)
-
- .. php:attr:: resource_sid
-
- The sid of the object this event is most relevant to (TaskSid, ReservationSid, WorkerSid)
-
- .. php:attr:: event_date
-
- The time this event was sent
-
- .. php:attr:: event_data
-
- Data about this specific event
-
-
-Reservation
-========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_Reservation
-
- .. php:attr:: sid
-
- The unique ID of this Reservation
-
- .. php:attr:: account_sid
-
- The ID of the Account that owns this Task
-
- .. php:attr:: workspace_sid
-
- The ID of the Workspace that this task is contained within
-
- .. php:attr:: task_sid
-
- The ID of the reserved Task
-
- .. php::attr:: worker_sid
-
- The ID of the reserverd Worker
-
- .. php:attr:: worker_name
-
- Human readable description of the Worker that is reserved
-
- .. php:attr:: reservation_status
-
- The current status of the reservation
-
-
-Workspace Statistics
-===========================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_WorkspaceStatistics
-
- .. php:attr:: longest_task_waiting_sid
-
- The ID of the longest waiting Task
-
- .. php:attr:: longest_task_waiting_age
-
- The age of the longest waiting Task
-
- .. php:attr:: total_tasks
-
- The total number of Tasks
-
- .. php:attr:: total_workers
-
- The total number of Workers in the workspace
-
- .. php:attr:: tasks_by_status
-
- The Tasks broken down by status (for example: pending: 1, reserved = 3, assigned = 2)
-
- .. php:attr:: activity_statistics
-
- A breakdown of Workers by Activity (for example: Idle : 0, Busy: 5, Reserved = 0, Offline = 2)
-
- .. php:attr:: tasks_created
-
- The total number of Tasks created
-
- .. php:attr:: tasks_canceled
-
- The total number of Tasks that were canceled
-
- .. php:attr:: tasks_deleted
-
- The total number of Tasks that were deleted
-
- .. php:attr:: tasks_moved
-
- The total number of Tasks that were moved from one queue to another
-
- .. php:attr:: tasks_timed_out_in_workflow
-
- The total number of Tasks that were timed out of their Workflows (and deleted)
-
- .. php:attr:: avg_task_acceptance_time
-
- The average time (in seconds) from Task creation to acceptance
-
- .. php:attr:: reservations_created
-
- The total number of Reservations that were created for Workers
-
- .. php:attr:: reservations_accepted
-
- The total number of Reservations accepted by Workers
-
- .. php:attr:: reservations_rejected
-
- The total number of Reservations that were rejected
-
- .. php:attr:: reservations_timed_out
-
- The total number of Reservations that were timed out
-
- .. php:attr:: reservations_canceled
-
- The total number of Reservations that were canceled
-
- .. php:attr:: reservations_rescinded
-
- The total number of Reservations that were rescinded
-
-
-Workflow Statistics
-======================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_WorkflowStatistics
-
- .. php:attr:: longest_task_waiting_sid
-
- The ID of the longest waiting Task
-
- .. php:attr:: longest_task_waiting_age
-
- The age of the longest waiting Task
-
- .. php:attr:: total_tasks
-
- The total number of Tasks
-
- .. php:attr:: tasks_by_status
-
- The Tasks broken down by status (for example: pending: 1, reserved = 3, assigned = 2)
-
- .. php:attr:: tasks_entered
-
- The total number of Tasks that entered this Workflow
-
- .. php:attr:: tasks_canceled
-
- The total number of Tasks that were canceled
-
- .. php:attr:: tasks_deleted
-
- The total number of Tasks that were deleted
-
- .. php:attr:: tasks_moved
-
- The total number of Tasks that were moved from one queue to another
-
- .. php:attr:: tasks_timed_out_in_workflow
-
- The total number of Tasks that were timed out of their Workflows (and deleted)
-
- .. php:attr:: avg_task_acceptance_time
-
- The average time (in seconds) from Task creation to acceptance
-
- .. php:attr:: reservations_created
-
- The total number of Reservations that were created for Workers
-
- .. php:attr:: reservations_accepted
-
- The total number of Reservations accepted by Workers
-
- .. php:attr:: reservations_rejected
-
- The total number of Reservations that were rejected
-
- .. php:attr:: reservations_timed_out
-
- The total number of Reservations that were timed out
-
- .. php:attr:: reservations_canceled
-
- The total number of Reservations that were canceled
-
- .. php:attr:: reservations_rescinded
-
- The total number of Reservations that were rescinded
-
-Worker Statistics
-======================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_WorkerStatistics
-
- .. php:attr:: reservations_created
-
- The total number of Reservations that were created
-
- .. php:attr:: reservations_accepted
-
- The total number of Reservations accepted
-
- .. php:attr:: reservations_rejected
-
- The total number of Reservations that were rejected
-
- .. php:attr:: reservations_timed_out
-
- The total number of Reservations that were timed out
-
- .. php:attr:: reservations_canceled
-
- The total number of Reservations that were canceled
-
- .. php:attr:: activity_duration
-
- The minimum, average, maximum and total time (in seconds) this Worker spent in each Activity
-
-
-TaskQueue Statistics
-======================
-
-.. php:class:: Services_Twilio_Rest_TaskRouter_TaskQueueStatistics
-
- .. php:attr:: longest_task_waiting_sid
-
- The ID of the longest waiting Task
-
- .. php:attr:: longest_task_waiting_age
-
- The age of the longest waiting Task
-
- .. php:attr:: total_tasks
-
- The total number of Tasks
-
- .. php:attr:: tasks_by_status
-
- The Tasks broken down by status (for example: pending: 1, reserved = 3, assigned = 2)
-
- .. php:attr:: activity_statistics
-
- The current Worker status count breakdown by Activity
-
- .. php:attr:: total_eligible_workers
-
- The total number of Workers eligible for Tasks in this TaskQueue
-
- .. php:attr:: total_available_workers
-
- The total number of Workers available for Tasks in this TaskQueue
-
- .. php:attr:: tasks_entered
-
- The total number of Tasks entered into this TaskQueue
-
- .. php:attr:: tasks_canceled
-
- The total number of Tasks canceled while in this TaskQueue
-
- .. php:attr:: tasks_deleted
-
- The total number of Tasks that were deleted while in this TaskQueue
-
- .. php:attr:: tasks_moved
-
- The total number of Tasks moved to another TaskQueue from this TaskQueue
-
- .. php:attr:: avg_task_acceptance_time
-
- The average time (in seconds) from Task creation to acceptance while in this TaskQueue
-
- .. php:attr:: reservations_accepted
-
- The total number of Reservations that were accepted for Tasks while in this TaskQueue
-
- .. php:attr:: reservations_rejected
-
- The total number of Reservations that were rejected for Tasks while in this TaskQueue
-
- .. php:attr:: reservations_timed_out
-
- The total number of Reservations that were tiemd out for Tasks while in this TaskQueue
-
- .. php:attr:: reservations_canceled
-
- The total number of Reservations that were canceled for Tasks while in this TaskQueue
-
- .. php:attr:: reservations_rescinded
-
- The total number of Reservations that were rescinded
diff --git a/docs/api/twiml.rst b/docs/api/twiml.rst
deleted file mode 100644
index de9f4c4..0000000
--- a/docs/api/twiml.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-###########################################
-API for TwiML Generation
-###########################################
-
-.. phpautoclass:: Services_Twilio_Twiml
- :filename: ../Services/Twilio/Twiml.php
- :members:
diff --git a/docs/conf.py b/docs/conf.py
deleted file mode 100644
index efdfbaf..0000000
--- a/docs/conf.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Services_Twilio documentation build configuration file, created by
-# sphinx-quickstart on Tue Mar 8 04:02:01 2011.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-from datetime import datetime
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinxcontrib.phpdomain', 'sphinxcontrib_phpautodoc']
-
-primary_domain = 'php'
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Services_Twilio'
-copyright = unicode(datetime.utcnow().year) + u', Twilio Inc'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '4.5'
-# The full version, including alpha/beta/rc tags.
-release = '4.5.0'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-sys.path.append(os.path.abspath('_themes'))
-html_theme_path = ['_themes']
-html_theme = 'kr'
-
-from sphinx.highlighting import lexers
-from pygments.lexers.web import PhpLexer
-lexers['php'] = PhpLexer(startinline=True)
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'Services_Twiliodoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'Services_Twilio.tex', u'Services\\_Twilio Documentation',
- u'Neuman Vong', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'services_twilio', u'Services_Twilio Documentation',
- [u'Neuman Vong'], 1)
-]
diff --git a/docs/faq.rst b/docs/faq.rst
deleted file mode 100644
index 015e631..0000000
--- a/docs/faq.rst
+++ /dev/null
@@ -1,130 +0,0 @@
-==========================
-Frequently Asked Questions
-==========================
-
-Hopefully you can find an answer here to one of your questions. If not, please
-contact `help@twilio.com <mailto:help@twilio.com>`_.
-
-Debugging Requests
-------------------
-
-Sometimes the library generates unexpected output. The simplest way to debug is
-to examine the HTTP request that twilio-php actually sent over the wire. You
-can turn on debugging with a simple flag:
-
-.. code-block:: php
-
- require('Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '456bef');
- $client->http->debug = true;
-
-Then make requests as you normally would. The URI, method, headers, and body
-of HTTP requests will be logged via the ``error_log`` function.
-
-
-require: Failed to open stream messages
------------------------------------------
-
-If you are trying to use the helper library and you get an error message that
-looks like this:
-
-.. code-block:: php
-
- PHP Warning: require(Services/Twilio.php): failed to open stream: No such
- file or directory in /path/to/file
-
- Fatal error: require(): Failed opening required 'Services/Twilio.php'
- (include_path='.:/usr/lib/php:/usr/local/php-5.3.8/lib/php') in
- /Library/Python/2.6/site-packages/phpsh/phpsh.php(578): on line 1
-
-Your PHP file can't find the Twilio library. The easiest way to do this is to
-move the Services folder from the twilio-php library into the folder containing
-your file. So if you have a file called ``send-sms.php``, your folder structure
-should look like this:
-
-.. code-block:: bash
-
- .
- ├── send-sms.php
- ├── Services
- │   ├── Twilio.php
- │   ├── Twilio
- │   │   ├── ArrayDataProxy.php
- │   │   ├── (..about 50 other files...)
-
-If you need to copy all of these files to your web hosting server, the easiest
-way is to compress them into a ZIP file, copy that to your server with FTP, and
-then unzip it back into a folder in your CPanel or similar.
-
-You can also try changing the ``require`` line like this:
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
-SSL Validation Exceptions
--------------------------
-
-If you are using an outdated version of `libcurl`, you may encounter
-SSL validation exceptions. If you see the following error message, you have
-a SSL validation exception: ::
-
- Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException'
- with message 'SSL certificate problem, verify that the CA cert is OK.
-
- Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
- verify failed' in [MY PATH]\Services\Twilio\TinyHttp.php:89
-
-This means that Twilio is trying to offer a certificate to verify that you are
-actually connecting to `https://api.twilio.com <https://api.twilio.com>`_, but
-your curl client cannot verify our certificate.
-
-Upgrade your version of the twilio-php library
-==============================================
-
-From November 2011 to November 2014, the SSL certificate was built into
-the helper library, and it is used to sign requests made to our API. Older
-releases of the helper library include expired certificates and will not
-work against the current API certificates. If you are
-still encountering this problem, you can upgrade your helper library to the
-latest version, and you should not encounter this error anymore.
-
-If you are using an older version of the helper library and cannot upgrade, you
-can try the the following:
-
-Disable the local copy of Twilio's certificate
-==============================================
-
-Replace this line in your client code that uses the Twilio helper library:
-
-.. code-block:: php
-
- $client = new Services_Twilio($sid, $token);
-
-With this one:
-
-.. code-block:: php
-
- $http = new Services_Twilio_TinyHttp(
- 'https://api.twilio.com',
- array('curlopts' => array(
- CURLOPT_SSL_VERIFYPEER => true,
- CURLOPT_SSL_VERIFYHOST => 2,
- ))
- );
-
- $client = new Services_Twilio($sid, $token, "2010-04-01", $http);
-
-
-Upgrade your version of libcurl
-===============================
-
-The certificate authority Twilio uses is included in the latest version of the
-``libcurl`` library. Upgrading your system version of ``libcurl`` will
-resolve the SSL error. `Click here to download the latest version of
-libcurl <http://curl.haxx.se/download.html>`_.
-
-If this does not work, double check your Account SID, token, and that you do
-not have errors anywhere else in your code. If you need further assistance,
-please email our customer support at `help@twilio.com`_.
diff --git a/docs/index.rst b/docs/index.rst
deleted file mode 100644
index 9184147..0000000
--- a/docs/index.rst
+++ /dev/null
@@ -1,232 +0,0 @@
-.. Services_Twilio documentation master file, created by
- sphinx-quickstart on Tue Mar 8 04:02:01 2011.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-=================
-**twilio-php**
-=================
-
-Status
-=======
-
-This documentation is for version 4.5.0 of `twilio-php
-<https://www.github.com/twilio/twilio-php>`_.
-
-Quickstart
-============
-
-Send an SMS
->>>>>>>>>>>
-
-.. code-block:: php
-
- // Download the library and copy into the folder containing this file.
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $account_sid = "ACXXXXXX"; // Your Twilio account sid
- $auth_token = "YYYYYY"; // Your Twilio auth token
-
- $client = new Services_Twilio($account_sid, $auth_token);
- $message = $client->account->messages->sendMessage(
- '+14085551234', // From a Twilio number in your account
- '+12125551234', // Text any number
- "Hello monkey!"
- );
-
- print $message->sid;
-
-Make a Call
->>>>>>>>>>>>>>
-
-.. code-block:: php
-
- // Download the library and copy into the folder containing this file.
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $account_sid = "ACXXXXXX"; // Your Twilio account sid
- $auth_token = "YYYYYY"; // Your Twilio auth token
-
- $client = new Services_Twilio($account_sid, $auth_token);
- $call = $client->account->calls->create(
- '+14085551234', // From a Twilio number in your account
- '+12125551234', // Call any number
-
- // Read TwiML at this URL when a call connects (hold music)
- 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient'
- );
-
-Generating TwiML
->>>>>>>>>>>>>>>>
-
-To control phone calls, your application needs to output `TwiML
-<http://www.twilio.com/docs/api/twiml/>`_. Use :class:`Services_Twilio_Twiml`
-to easily create such responses.
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml();
- $response->say('Hello');
- $response->play('https://api.twilio.com/cowbell.mp3', array("loop" => 5));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="utf-8"?>
- <Response>
- <Say>Hello</Say>
- <Play loop="5">https://api.twilio.com/cowbell.mp3</Play>
- </Response>
-
-View more examples of TwiML generation here: :ref:`usage-twiml`
-
-Creating a Task
-===================
-
-You can easily create a task. Tasks can represent whatever type of work is important for your team. Twilio applications can create tasks from phone calls or SMS messages.
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set task parameters
- $workflowSid = 'YOUR_WORKFLOW_SID';
- $taskAttributes = '{"selected_language": "fr"}';
- $priority = 10;
- $timeout = 100;
-
- // create task
- $task = $taskrouterClient->workspace->tasks->create(
- $taskAttributes,
- $workflowSid,
- array(
- 'Priority' => $priority,
- 'Timeout' => $timeout
- )
- );
-
- // confirm task created
- echo "Created Task: ".$task->sid;
-
-Find more examples and details of TaskRouter here: :ref:`usage-taskrouter`
-
-Installation
-============
-
-There are two ways to install **twilio-php**: via Composer, or by
-downloading the source.
-
-Via Composer
->>>>>>>>>>>>>
-
-.. code-block:: bash
-
- composer require 'twilio/sdk'
-
-From Source
->>>>>>>>>>>>>
-
-If you aren't using Composer, download the `source (.zip)
-<https://github.com/twilio/twilio-php/zipball/master>`_, which includes all the
-dependencies.
-
-User Guide
-==================
-
-REST API
->>>>>>>>>>
-
-.. toctree::
- :maxdepth: 2
- :glob:
-
- usage/rest
- usage/rest/*
-
-TwiML and other utilities
->>>>>>>>>>>>>>>>>>>>>>>>>>
-
-.. toctree::
- :maxdepth: 1
-
- usage/twiml
- usage/validation
- usage/token-generation
- faq/
-
-TaskRouter Reference
->>>>>>>>>>>>>>>>>>>>>
-
-.. toctree::
- :maxdepth: 2
- :glob:
-
- usage/taskrouter
- usage/taskrouter/*
-
-API Documentation
-==================
-
-.. toctree::
- :maxdepth: 3
- :glob:
-
- api/*
-
-
-Support and Development
-===========================
-
-All development occurs on `Github <https://github.com/twilio/twilio-php>`_. To
-check out the source, run
-
-.. code-block:: bash
-
- git clone git@github.com:twilio/twilio-php.git
-
-Report bugs using the Github `issue tracker <https://github.com/twilio/twilio-php/issues>`_.
-
-If you've got questions that aren't answered by this documentation, ask the
-Twilio support team at help@twilio.com.
-
-Running the Tests
->>>>>>>>>>>>>>>>>>>>>>>>>
-
-The unit tests depend on `Mockery <https://github.com/padraic/mockery>`_ and
-`PHPUnit <https://github.com/sebastianbergmann/phpunit>`_. First, 'discover' all
-the necessary `PEAR` channels:
-
-.. code-block:: bash
-
- make test-install
-
-After installation, run the tests with :data:`make`.
-
-.. code-block:: bash
-
- make test
-
-
-Making the Documentation
->>>>>>>>>>>>>>>>>>>>>>>>>>
-
-Our documentation is written using `Sphinx <http://sphinx.pocoo.org/>`_. You'll
-need to install Sphinx and the Sphinx PHP domain before you can build the docs.
-
-.. code-block:: bash
-
- make docs-install
-
-Once you have those installed, making the docs is easy.
-
-.. code-block:: bash
-
- make docs
-
diff --git a/docs/quickstart.rst b/docs/quickstart.rst
deleted file mode 100644
index f8441c3..0000000
--- a/docs/quickstart.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-=============
-Quickstart
-=============
-
-Making a Call
-==============
-
-.. code-block:: php
-
- $sid = "ACXXXXXX"; // Your Twilio account sid
- $token = "YYYYYY"; // Your Twilio auth token
-
- $client = new Services_Twilio($sid, $token);
- $call = $client->account->calls->create(
- '9991231234', // From this number
- '8881231234', // Call this number
- 'http://foo.com/call.xml'
- );
-
-Generating TwiML
-==================
-
-To control phone calls, your application need to output TwiML. Use :class:`Services_Twilio_Twiml` to easily create such responses.
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml();
- $response->say('Hello');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="utf-8"?>
- <Response><Play loop="5">monkey.mp3</Play><Response>
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index 8c327a5..0000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-sphinxcontrib-phpdomain
-hg+https://bitbucket.org/tk0miya/tk.phpautodoc
-
diff --git a/docs/usage/rest.rst b/docs/usage/rest.rst
deleted file mode 100644
index e6edade..0000000
--- a/docs/usage/rest.rst
+++ /dev/null
@@ -1,98 +0,0 @@
-.. _ref-rest:
-
-==========================
-Using the Twilio REST API
-==========================
-
-Since version 3.0, we've introduced an updated API for interacting with the
-Twilio REST API. Gone are the days of manual URL creation and XML parsing.
-
-Creating a REST Client
-=======================
-
-Before querying the API, you'll need to create a :php:class:`Services_Twilio`
-instance. The constructor takes your Twilio Account Sid and Auth
-Token (both available through your `Twilio Account Dashboard
-<http:www.twilio.com/user/account>`_).
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
-The :attr:`account` attribute
------------------------------
-
-You access the Twilio API resources through this :attr:`$client`,
-specifically the :attr:`$account` attribute, which is an instance of
-:php:class:`Services_Twilio_Rest_Account`. We'll use the `Calls resource
-<http://www.twilio.com/docs/api/rest/call>`_ as an example.
-
-Listing Resources
-====================
-
-Iterating over the :attr:`calls` attribute will iterate over all of your call
-records, handling paging for you. Only use this when you need to get all your
-records.
-
-The :attr:`$call` object is a :php:class:`Services_Twilio_Rest_Call`, which
-means you can easily access fields through it's properties. The attribute names
-are lowercase and use underscores for sepearators. All the available attributes
-are documented in the :doc:`/api/rest` documentation.
-
-.. code-block:: php
-
- // If you have many calls, this could take a while
- foreach($client->account->calls as $call) {
- print $call->price . '\n';
- print $call->duration . '\n';
- }
-
-Filtering Resources
--------------------
-
-Many Twilio list resources allow for filtering via :php:meth:`getIterator`
-which takes an optional array of filter parameters. These parameters correspond
-directlty to the listed query string parameters in the REST API documentation.
-
-You can create a filtered iterator like this:
-
-.. code-block:: php
-
- $filteredCalls = $client->account->calls->getIterator(
- 0, 50, array("Status" => "in-progress"));
- foreach($filteredCalls as $call) {
- print $call->price . '\n';
- print $call->duration . '\n';
- }
-
-Retrieving the Total Number of Resources
-----------------------------------------
-
-Each of the list resources supports the `Countable` interface, which means you
-can retrieve the total number of list items like so:
-
-.. code-block:: php
-
- echo count($client->account->calls);
-
-Getting a Specific Resource
-=============================
-
-If you know the unique identifier for a resource, you can get that resource
-using the :php:meth:`get` method on the list resource.
-
-.. code-block:: php
-
- $call = $client->account->calls->get("CA123");
-
-:php:meth:`get` fetches objects lazily, so it will only load a resource when it
-is needed. This allows you to get nested objects without making multiple HTTP
-requests.
-
-.. code-block:: php
-
- $participant = $client->account->conferences
- ->get("CO123")->participants->get("PF123");
-
diff --git a/docs/usage/rest/accounts.rst b/docs/usage/rest/accounts.rst
deleted file mode 100644
index de9bbe7..0000000
--- a/docs/usage/rest/accounts.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-==================
-Accounts
-==================
-
-Updating Account Information
-==============================
-
-Updating :class:`Account <Services_Twilio_Rest_Account>` information is really easy:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $account = $client->account;
- $account->update(array('FriendlyName' => 'My Awesome Account'));
-
-Creating a Subaccount
-==============================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $subaccount = $client->accounts->create(array(
- 'FriendlyName' => 'My Awesome SubAccount'
- ));
diff --git a/docs/usage/rest/applications.rst b/docs/usage/rest/applications.rst
deleted file mode 100644
index 337cbba..0000000
--- a/docs/usage/rest/applications.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-==================
-Applications
-==================
-
-Creating Applications
-==============================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $application = $client->account->applications->create('Application Friendly Name',
- array(
- 'FriendlyName' => 'My Application Name',
- 'VoiceUrl' => 'http://foo.com/voice/url',
- 'VoiceFallbackUrl' => 'http://foo.com/voice/fallback/url',
- 'VoiceMethod' => 'POST',
- 'SmsUrl' => 'http://foo.com/sms/url',
- 'SmsFallbackUrl' => 'http://foo.com/sms/fallback/url',
- 'SmsMethod' => 'POST'
- )
- );
-
-
-Updating An Application
-==============================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $application = $client->account->applications->get('AP123');
- $application->update(array(
- 'VoiceUrl' => 'http://foo.com/new/voice/url'
- ));
-
-
-Finding an Application by Name
-==============================
-
-Find an :class:`Application` by its name (full name match).
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $application = false;
- $params = array(
- 'FriendlyName' => 'My Application Name'
- );
- foreach($client->account->applications->getIterator(0, 1, $params) as $_application) {
- $application = $_application;
- } \ No newline at end of file
diff --git a/docs/usage/rest/callerids.rst b/docs/usage/rest/callerids.rst
deleted file mode 100644
index 40841be..0000000
--- a/docs/usage/rest/callerids.rst
+++ /dev/null
@@ -1,27 +0,0 @@
-============
- Caller Ids
-============
-
-Validate a Phone Number
-=======================
-Adding a new phone number to your validated numbers is quick and easy:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $response = $client->account->outgoing_caller_ids->create('+15554441234');
- print $response->validation_code;
-
-Twilio will call the provided number and for the validation code to be entered.
-
-Listing all Validated Phone Numbers
-===================================
-
-Show all the current caller_ids:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->outgoing_caller_ids as $caller_id) {
- print $caller_id->friendly_name;
- }
diff --git a/docs/usage/rest/calls.rst b/docs/usage/rest/calls.rst
deleted file mode 100644
index 5723f5e..0000000
--- a/docs/usage/rest/calls.rst
+++ /dev/null
@@ -1,159 +0,0 @@
-============
- Phone Calls
-============
-
-Making a Phone Call
-===================
-
-The :class:`Calls` resource allows you to make outgoing calls:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $call = $client->account->calls->create(
- '9991231234', // From this number
- '8881231234', // Call this number
- 'http://foo.com/call.xml'
- );
- print $call->length;
- print $call->sid;
-
-Adding Extra Call Parameters
-============================
-
-Add extra parameters, like a `StatusCallback` when the call ends, like this:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $call = $client->account->calls->create(
- '9991231234', // From this number
- '8881231234', // Call this number
- 'http://foo.com/call.xml',
- array(
- 'StatusCallback' => 'http://foo.com/callback',
- 'StatusCallbackMethod' => 'GET'
- )
- );
-
-A full list of extra parameters can be found `here
-<http://www.twilio.com/docs/api/rest/making-calls#post-parameters-optional>`_.
-
-Listing Calls
-=============
-
-It's easy to iterate over your list of calls.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->calls as $call) {
- echo "From: {$call->from}\nTo: {$call->to}\nSid: {$call->sid}\n\n";
- }
-
-Filtering Calls
-===============
-
-Let's say you want to find all of the calls that have been sent from
-a particular number. You can do so by constructing an iterator explicitly:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->calls->getIterator(0, 50, array(
- 'From' => '+14105551234'
- )) as $call) {
- echo "From: {$call->from}\nTo: {$call->to}\nSid: {$call->sid}\n\n";
- }
-
-Accessing Resources from a Specific Call
-========================================
-
-The :class:`Call` resource has some subresources you can access, such as
-notifications, recordings and feedback. If you have already have a :class:`Call`
-resource, they are easy to get:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->calls as $call) {
- $notifications = $call->notifications;
- if (is_array($notifications)) {
- foreach ($notifications as $notification) {
- print $notification->sid;
- }
- }
-
- $transcriptions = $call->transcriptions;
- if (is_array($transcriptions)) {
- foreach ($transcriptions as $transcription) {
- print $transcription->sid;
- }
- }
-
- $recordings = $call->recordings;
- if (is_array($recordings)) {
- foreach ($recordings as $recording) {
- print $recording->sid;
- }
- }
-
- $feedback = $call->feedback;
- if ($feedback !== null) {
- print $feedback->quality_score
- }
- }
-
-Be careful, as the above code makes quite a few HTTP requests and may display
-PHP warnings for uninitialized variables.
-
-Retrieve a Call Record
-======================
-
-If you already have a :class:`Call` sid, you can use the client to retrieve
-that record.:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $sid = "CA12341234";
- $call = $client->account->calls->get($sid)
-
-Delete a Call Record
-====================
-
-To protect your users' privacy and/or comply with legal requirements, Twilio allows you
-to delete call records:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $sid = "CA12341234";
- $call = $client->account->calls->get($sid);
- $call->delete();
-
-Modifying live calls
-====================
-
-The :class:`Call` resource makes it easy to find current live calls and
-redirect them as necessary:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $calls = $client->account->calls->getIterator(0, 50, array('Status' => 'in-progress'));
- foreach ($calls as $call) {
- $call->update(array('Url' => 'http://foo.com/new.xml', 'Method' => 'POST'));
- }
-
-Ending all live calls is also possible:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $calls = $client->account->calls->getIterator(0, 50, array('Status' => 'in-progress'));
- foreach ($calls as $call) {
- $call->hangup();
- }
-
-Note that :meth:`hangup` will also cancel calls currently queued.
diff --git a/docs/usage/rest/conferences.rst b/docs/usage/rest/conferences.rst
deleted file mode 100644
index a47d7dd..0000000
--- a/docs/usage/rest/conferences.rst
+++ /dev/null
@@ -1,48 +0,0 @@
-=============
- Conferences
-=============
-
-List All Conferences
-====================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->conferences as $conference) {
- print $conference->friendly_name;
- }
-
-For a full list of properties available on a conference, as well as a full list
-of ways to filter a conference, please see the `Conference API Documentation
-<http://www.twilio.com/docs/api/rest/conference>`_ on our website.
-
-Filter Conferences by Status
-============================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->conferences->getIterator(0, 50, array(
- 'Status' => 'in-progress'
- )) as $conf) {
- print $conf->sid;
- }
-
-Mute all participants
-=====================
-
-At the moment, using an iterator directly will cause this method to infinitely
-loop. Instead, use the getPage function. As conferences are limited to 40
-participants, getPage(0, 50) should return a list of every participant in
-a conference.
-
-.. code-block:: php
-
- $sid = "CO119231312";
- $client = new Services_Twilio('AC123', '123');
- $conference = $client->account->conferences->get($sid);
- $page = $conference->participants->getPage(0, 50);
- $participants = $page->participants;
- foreach ($participants as $p) {
- $p->mute();
- }
diff --git a/docs/usage/rest/members.rst b/docs/usage/rest/members.rst
deleted file mode 100644
index 464fda1..0000000
--- a/docs/usage/rest/members.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-=============
-Members
-=============
-
-List All Members in a Queue
-============================
-
-Each queue instance resource has a list of members.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $queue_sid = 'QQ123';
- $queue = $client->account->queues->get('QQ123');
- foreach ($queue->members as $member) {
- echo "Call Sid: {$member->call_sid}\nWait Time: {$member->wait_time}\n";
- }
-
-Dequeue a Member
-=================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $queue = $client->account->queues->get('QQ123');
- foreach ($queue->members as $member) {
- // Dequeue the first member and fetch the Forward twimlet for that
- // member.
- $member->dequeue('http://twimlets.com/forward', 'GET');
- break;
- }
-
-Retrieve the Member at the Front of a Queue
-===========================================
-
-The Members class has a method called ``front`` which can be used to retrieve
-the member at the front of the queue.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $queue = $client->account->queues->get('QQ123');
- $firstMember = $queue->members->front();
- echo $firstMember->position;
- echo $firstMember->call_sid;
-
diff --git a/docs/usage/rest/messages.rst b/docs/usage/rest/messages.rst
deleted file mode 100644
index 76de032..0000000
--- a/docs/usage/rest/messages.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-=============
-Messages
-=============
-
-Sending a Message
-=====================
-
-The :class:`Messages <Services_Twilio_Rest_Messages>` resource allows you to
-send outgoing SMS or MMS messages.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $message = $client->account->messages->sendMessage(
- '+14085551234', // From a Twilio number in your account
- '+12125551234', // Text any number
- 'Hello monkey!', // Message body (if any)
- array('http://example.com/image.jpg'), // An array of MediaUrls
- );
-
- echo $message->sid;
-
-Listing Messages
-====================
-
-It's easy to iterate over your messages.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->messages as $message) {
- echo "From: {$message->from}\nTo: {$message->to}\nBody: " . $message->body;
- }
-
-Filtering Messages
-======================
-
-Let's say you want to find all of the messages that have been sent from
-a particular number. You can do so by constructing an iterator explicitly:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->messages->getIterator(0, 50, array(
- 'From' => '+14105551234',
- )) as $message) {
- echo "From: {$message->from}\nTo: {$message->to}\nBody: " . $message->body;
- }
-
-Redacting or Deleting Messages
-==============================
-
-To protect your users' privacy, you can delete your Message records or redact
-their contents.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $message = $client->account->messages->get("MM123");
- $message->redact(); // Erases 'Body' field contents
- $message->delete(); // Deletes entire message record \ No newline at end of file
diff --git a/docs/usage/rest/notifications.rst b/docs/usage/rest/notifications.rst
deleted file mode 100644
index 0df0c43..0000000
--- a/docs/usage/rest/notifications.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-===============
- Notifications
-===============
-
-Filter Notifications by Log Level
-=================================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->notifications->getIterator(0, 50, array("LogLevel" => 0)) as $n) {
- print $n->error_code;
- }
diff --git a/docs/usage/rest/phonenumbers.rst b/docs/usage/rest/phonenumbers.rst
deleted file mode 100644
index e929882..0000000
--- a/docs/usage/rest/phonenumbers.rst
+++ /dev/null
@@ -1,187 +0,0 @@
-=================
- Phone Numbers
-=================
-
-Purchasing phone numbers is a two step process.
-
-Searching For a Number
-----------------------
-
-First, we need to search for an available phone number. Use the
-:php:meth:`Services_Twilio_Rest_AvailablePhoneNumbers::getList` method of the
-:php:class:`Services_Twilio_Rest_AvailablePhoneNumbers` list resource.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
- $numbers = $client->account->available_phone_numbers->getList('US', 'TollFree');
- foreach($numbers->available_phone_numbers as $number) {
- echo 'Number: ' + $number->phone_number + "\n";
- }
-
-You can also pass in parameters to search for phone numbers in a certain area
-code, or which contain a certain pattern.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
-
- // Full parameter documentation at http://www.twilio.com/docs/api/rest/available-phone-numbers#local
- $params = array('AreaCode' => '925', 'Contains' => 'hi');
- $numbers = $client->account->available_phone_numbers->getList('US', 'Local', $params);
- foreach($numbers->available_phone_numbers as $number) {
- echo 'Number: ' + $number->phone_number + "\n";
- }
-
-You can also use the type subresources to search for a given type.
-
-Available types include:
-- `local`
-- `toll_free`
-- `mobile`
-
-.. code-block:: php
-
- // Local
- $numbers = $client->account->available_phone_numbers->local;
- foreach($numbers as $number) {
- echo 'Number: ' + $number->phone_number + "\n";
- }
-
- // TollFree
- $numbers = $client->account->available_phone_numbers->toll_free;
- foreach($numbers as $number) {
- echo 'Number: ' + $number->phone_number + "\n";
- }
-
- // Mobile
- $numbers = $client->account->available_phone_numbers->mobile;
- foreach($numbers as $number) {
- echo 'Number: ' + $number->phone_number + "\n";
- }
-
-
-Buying a Number
----------------
-
-Once you have a phone number, purchase it by creating a new
-:php:class:`Services_Twilio_Rest_IncomingPhoneNumber` instance.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
-
- $phoneNumber = '+44XXXYYYZZZZ';
- $purchasedNumber = $client->account->incoming_phone_numbers->create(array('PhoneNumber' => $phoneNumber));
-
- echo $purchasedNumber->sid;
-
-Tying the two together, you can search for a number, and then purchase it.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
-
- // Full parameter documentation at http://www.twilio.com/docs/api/rest/available-phone-numbers#local
- $params = array('AreaCode' => '800', 'Contains' => 'hi');
-
- $numbers = $client->account->available_phone_numbers->getList('CA', 'TollFree', $params);
- $firstNumber = $numbers->available_phone_numbers[0]->phone_number;
- $purchasedNumber = $client->account->incoming_phone_numbers->create(array('PhoneNumber' => $firstNumber));
-
- echo $purchasedNumber->sid;
-
-You can also purchase a random number with a given area code (US/Canada only):
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
- $purchasedNumber = $client->account->incoming_phone_numbers->create(array('AreaCode' => '925'));
-
- echo $purchasedNumber->sid;
-
-Retrieving All of a Number's Properties
----------------------------------------
-
-If you know the number and you want to retrieve all of the properties of that
-number, such as the ``voice_url`` or the ``sms_method``, you can use the
-:php:meth:`Services_Twilio_Rest_IncomingPhoneNumbers::getNumber` convenience
-function.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
-
- // Number must be in e.164 format.
- $number = $client->account->incoming_phone_numbers->getNumber('+14105551234');
- echo $number->voice_url;
-
-If you know the ``sid`` of a phone number, you can retrieve it using the
-``get()`` function.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
-
- $number = $client->account->incoming_phone_numbers->get('PN123456');
- echo $number->voice_url;
-
-Updating a Number
------------------
-
-You can easily update any of the properties of your
-phone number. A full list of parameters is available
-in the `Incoming Phone Number REST API Documentation.
-<http://www.twilio.com/docs/api/rest/incoming-phone-numbers#instance-post>`_
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
- $numbers = $client->account->incoming_phone_numbers;
- foreach ($numbers as $number) {
- $number->update(array('VoiceMethod' => 'POST'));
- }
-
-Deleting a Number
------------------
-
-You can delete numbers by specifying the Sid of the phone number you'd like to
-delete, from the incoming phone numbers object.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
-
- $client = new Services_Twilio($accountSid, $authToken);
- $numbers = $client->account->incoming_phone_numbers;
- foreach($numbers as $number) {
- // Delete just the first number, then quit.
- $client->account->incoming_phone_numbers->delete($number->sid);
- break;
- }
-
diff --git a/docs/usage/rest/pricing.rst b/docs/usage/rest/pricing.rst
deleted file mode 100644
index 2263282..0000000
--- a/docs/usage/rest/pricing.rst
+++ /dev/null
@@ -1,137 +0,0 @@
-.. _ref-rest:
-
-============================
-Using the Twilio Pricing API
-============================
-
-The Twilio Pricing API works similarly to the main Twilio REST API,
-but is located on a new domain: `pricing.twilio.com`.
-
-The Pricing API is accessible through a new :php:class:`Pricing_Services_Twilio`
-class that works much like the :php:class:`Services_Twilio` object you already
-use for the main Twilio REST API.
-
-Creating a Pricing Client
-=========================
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
-Accessing Resources
-===================
-
-The Pricing API resources function similarly to those available in the main
-Twilio API. For basic examples, see :doc:`/usage/rest`.
-
-Voice Pricing
-=============
-
-Twilio Voice pricing is available by country and by phone number.
-
-Voice calls are priced per minute and reflect the current Twilio list
-price as well as any discounts available for your account at the time
-you request pricing information.
-
-Voice Countries
----------------
-
-To retrieve a list of countries where Twilio voice services are available:
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
- $countryList = $client->voiceCountries->getPage();
- foreach ($countryList->countries as $c) {
- echo $c->isoCountry . "\n";
- }
-
-Note that the country objects in the returned list will not have pricing
-information populated; you will need to retrieve the specific information
-for each country you are interested in individually:
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
- $country = $client->voiceCountries->get("GB");
- echo $country->iso_country . "\n";
- echo $country->price_unit . "\n";
-
- foreach ($country->outbound_prefix_prices as $price) {
- // Price per minute before discounts
- echo $price->base_price . "\n";
- // Price per minute after applying any discounts available
- // to your account
- echo $price->current_price . "\n";
- // Prefixes of phone numbers to which these rates apply
- foreach ($price->prefixes as $prefix) {
- echo $prefix . "\n";
- }
- }
-
-Voice Numbers
--------------
-
-To retrieve pricing information for calls to and from a specific phone number:
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
- $number = $client->voiceNumbers->get("+15105551234");
- echo $number->price_unit . "\n";
- echo $number->outbound_call_price->call_base_price . "\n";
- // $number->inbound_call_price is only set for Twilio-hosted numbers
- echo $number->inbound_call_price->call_base_price . "\n";
-
-Phone Number Pricing
-====================
-
-Twilio Phone Numbers are priced per month.
-
-To retrieve a list of countries where Twilio Numbers are available:
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
- $countryList = $client->phoneNumberCountries->getPage();
- foreach ($countryList->countries as $c) {
- echo $c->iso_country . "\n";
- }
-
-Note that the country objects in the returned list will not have pricing
-information populated; you will need to retrieve the specific information
-for each country you are interested in individually:
-
-.. code-block:: php
-
- $ACCOUNT_SID = "AC123";
- $AUTH_TOKEN = "secret";
- $client = new Pricing_Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
-
- $country = $client->phoneNumberCountries->get("GB");
- echo $country->price_unit . "\n";
-
- foreach ($country->phone_number_prices as $p) {
- // "mobile", "toll_free", "local", or "national"
- echo $p->number_type . "\n";
- // Number price per month before discounts
- echo $p->base_price . "\n";
- // Number price per month after available discounts for your
- // account have been applied
- echo $p->current_price . "\n";
- }
-
diff --git a/docs/usage/rest/queues.rst b/docs/usage/rest/queues.rst
deleted file mode 100644
index f75f333..0000000
--- a/docs/usage/rest/queues.rst
+++ /dev/null
@@ -1,56 +0,0 @@
-=============
-Queues
-=============
-
-Create a New Queue
-=====================
-
-To create a new queue, make an HTTP POST request to the Queues resource.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- // Default MaxSize is 100. Or change it by adding a parameter, like so
- $queue = $client->account->queues->create('First Queue',
- array('MaxSize' => 10));
-
- print $queue->sid;
- print $queue->friendly_name;
-
-Listing Queues
-====================
-
-It's easy to iterate over your list of queues.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->queues as $queue) {
- echo $queue->sid;
- }
-
-Deleting Queues
-====================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $queue_sid = 'QQ123';
- $client->account->queues->delete('QQ123');
-
-Retrieve the Member at the Front of a Queue
-===========================================
-
-The Members class has a method called ``front`` which can be used to retrieve
-the member at the front of the queue.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- $queue = $client->account->queues->get('QQ123');
- $firstMember = $queue->members->front();
- echo $firstMember->position;
- echo $firstMember->call_sid;
-
diff --git a/docs/usage/rest/recordings.rst b/docs/usage/rest/recordings.rst
deleted file mode 100644
index 69cce54..0000000
--- a/docs/usage/rest/recordings.rst
+++ /dev/null
@@ -1,61 +0,0 @@
-==========
-Recordings
-==========
-
-Listing Recordings
-------------------
-
-Run the following to get a list of all of your recordings:
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
- $client = new Services_Twilio($accountSid, $authToken);
-
- foreach($client->account->recordings as $recording) {
- echo "Access recording {$recording->sid} at:" . "\n";
- echo $recording->uri;
- }
-
-For more information about which properties are available for a recording
-object, please see the `Twilio Recordings API Documentation <http://www.twilio.com/docs/api/rest/recording>`_.
-
-Please note that the ``uri`` returned by default is a JSON dictionary
-containing metadata about the recording; you can access the .wav version by
-stripping the ``.json`` extension from the ``uri`` returned by the library.
-
-Filtering Recordings By Call Sid
---------------------------------
-
-Pass filters as an array to filter your list of recordings, with any of the
-filters listed in the `recording list documentation <http://www.twilio.com/docs/api/rest/recording#list-get-filters>`_.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
- $client = new Services_Twilio($accountSid, $authToken);
-
- foreach($client->account->recordings->getIterator(0, 50, array('DateCreated>' => '2011-01-01')) as $recording) {
- echo $recording->uri . "\n";
- }
-
-Deleting a Recording
---------------------
-
-To delete a recording, get the sid of the recording, and then pass it to the
-client.
-
-.. code-block:: php
-
- $accountSid = 'AC1234567890abcdef1234567890a';
- $authToken = 'abcdef1234567890abcdefabcde9';
- $client = new Services_Twilio($accountSid, $authToken);
-
- foreach($client->account->recordings as $recording) {
- $client->account->recordings->delete($recording->sid);
- echo "Deleted recording {$recording->sid}, the first one in the list.";
- break;
- }
-
diff --git a/docs/usage/rest/sip.rst b/docs/usage/rest/sip.rst
deleted file mode 100644
index 5a9cfee..0000000
--- a/docs/usage/rest/sip.rst
+++ /dev/null
@@ -1,88 +0,0 @@
-=============
-Sip In
-=============
-
-Getting started with Sip
-==========================
-
-If you're unfamiliar with SIP, please see the `SIP API Documentation
-<https://www.twilio.com/docs/api/rest/sip>`_ on our website.
-
-Creating a Sip Domain
-=========================
-
-The :class:`Domains <Services_Twilio_Rest_Domains>` resource allows you to
-create a new domain. To create a new domain, you'll need to choose a unique
-domain that lives under sip.twilio.com. For example, doug.sip.twilio.com.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $domain = $client->account->sip->domains->create(
- "Doug's Domain", // The FriendlyName for your new domain
- "doug.sip.twilio.com", // The sip domain for your new domain
- array(
- 'VoiceUrl' => 'http://example.com/voice',
- ));
-
- echo $domain->sid;
-
-Creating a new IpAccessControlList
-====================================
-
-To control access to your new domain, you'll need to explicitly grant access
-to individual ip addresses. To do this, you'll first need to create an
-:class:`IpAccessControlList <Services_Twilio_Rest_IpAccessControlList>` to hold
-the ip addresses you wish to allow.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $ip_access_control_list = $client->account->sip->ip_access_control_lists->create(
- "Doug's IpAccessControlList", // The FriendlyName for your new ip access control list
- );
-
- echo $ip_access_control_list->sid;
-
-Adding an IpAddress to an IpAccessControlList
-==============================================
-
-Now it's time to add an :class:`IpAddress
-<Services_Twilio_Rest_IpAddress>` to your new :class:`IpAccessControlList
-<Services_Twilio_Rest_IpAccessControlList>`.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $ip_address = $client->account->sip->ip_access_control_lists->get('AC123')->ip_addresses->create(
- "Doug's IpAddress", // The FriendlyName for this IpAddress
- '127.0.0.1', // The ip address for this IpAddress
- );
-
- echo $ip_address->sid;
-
-Adding an IpAccessControlList to a Domain
-===========================================
-
-Once you've created a :class:`Domain <Services_Twilio_Rest_Domain>` and an
-:class:`IpAccessControlList <Services_Twilio_Rest_IpAccessControlList>`
-you need to associate them. To do this,
-create an :class:`IpAccessControlListMapping
-<Services_Twilio_Rest_IpAccessControlListMapping>`.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $ip_access_control_list_mapping = $client->account->sip->domains->get('SD123')->ip_access_control_list_mappings->create(
- 'AL123', // The sid of your IpAccessControlList
- );
-
- echo $ip_access_control_list_mapping->sid;
diff --git a/docs/usage/rest/sms-messages.rst b/docs/usage/rest/sms-messages.rst
deleted file mode 100644
index c1ccffe..0000000
--- a/docs/usage/rest/sms-messages.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-=============
-SMS Messages
-=============
-
-Sending a SMS Message
-=====================
-
-
-The :php:class:`Services_Twilio_Rest_SmsMessages` resource allows you to send
-outgoing text messages.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio.php');
-
- $client = new Services_Twilio('AC123', '123');
- $message = $client->account->sms_messages->create(
- '+14085551234', // From a Twilio number in your account
- '+12125551234', // Text any number
- "Hello monkey!"
- );
-
- print $message->sid;
-
-Listing SMS Messages
-====================
-
-It's easy to iterate over your SMS messages.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->sms_messages as $message) {
- echo "From: {$message->from}\nTo: {$message->to}\nBody: " . $message->body;
- }
-
-Filtering SMS Messages
-======================
-
-Let's say you want to find all of the SMS messages that have been sent from
-a particular number. You can do so by constructing an iterator explicitly:
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->sms_messages->getIterator(0, 50, array(
- 'From' => '+14105551234',
- )) as $message) {
- echo "From: {$message->from}\nTo: {$message->to}\nBody: " . $message->body;
- }
diff --git a/docs/usage/rest/transcriptions.rst b/docs/usage/rest/transcriptions.rst
deleted file mode 100644
index dfe38d6..0000000
--- a/docs/usage/rest/transcriptions.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-================
-Transcriptions
-================
-
-Show all Transcribed Messages
-=============================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '123');
- foreach ($client->account->transcriptions as $t) {
- print $t->transcription_text;
- }
diff --git a/docs/usage/rest/usage-records.rst b/docs/usage/rest/usage-records.rst
deleted file mode 100644
index bf33836..0000000
--- a/docs/usage/rest/usage-records.rst
+++ /dev/null
@@ -1,91 +0,0 @@
-=============
-Usage Records
-=============
-
-Twilio offers a Usage Record API so you can better measure how much you've been
-using Twilio. Here are some examples of how you can use PHP to access the usage
-API.
-
-Retrieve All Usage Records
-==========================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_records as $record) {
- echo "Record: $record";
- }
-
-Retrieve Usage Records For A Time Interval
-==========================================
-
-UsageRecords support `several convenience subresources
-<http://www.twilio.com/docs/api/rest/usage-records#list-subresources>`_ that
-can be accessed as properties on the `record` object.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_records->last_month as $record) {
- echo "Record: $record";
- }
-
-Retrieve All Time Usage for A Usage Category
-============================================
-
-By default, Twilio will return your all-time usage for a given usage category.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- $callRecord = $client->account->usage_records->getCategory('calls');
- echo $callRecord->usage;
-
-Retrieve All Usage for a Given Time Period
-==========================================
-
-You can filter your UsageRecord list by providing `StartDate` and `EndDate`
-parameters.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_records->getIterator(0, 50, array(
- 'StartDate' => '2012-08-01',
- 'EndDate' => '2012-08-31',
- )) as $record) {
- echo $record->description . "\n";
- echo $record->usage . "\n";
- }
-
-Retrieve Today's SMS Usage
-==========================
-
-You can use the `today` record subresource, and then retrieve the record
-directly with the `getCategory` function.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- // You can substitute 'yesterday', 'all_time' for 'today' below
- $smsRecord = $client->account->usage_records->today->getCategory('sms');
- echo $smsRecord->usage;
-
-Retrieve Daily Usage Over a One-Month Period
-=============================================
-
-The code below will retrieve daily summaries of recordings usage for August
-2012. To retrieve all categories of usage, remove the 'Category' filter from
-the `getIterator` array.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_records->daily->getIterator(0, 50, array(
- 'StartDate' => '2012-08-01',
- 'EndDate' => '2012-08-31',
- 'Category' => 'recordings',
- )) as $record) {
- echo $record->usage;
- }
-
diff --git a/docs/usage/rest/usage-triggers.rst b/docs/usage/rest/usage-triggers.rst
deleted file mode 100644
index 18cce82..0000000
--- a/docs/usage/rest/usage-triggers.rst
+++ /dev/null
@@ -1,92 +0,0 @@
-==============
-Usage Triggers
-==============
-
-Twilio offers a Usage Trigger API so you can get notifications when your Twilio
-usage exceeds a given level. Here are some examples of how you can
-use PHP to create new usage triggers or modify existing triggers.
-
-Retrieve A Usage Trigger's Properties
-=====================================
-
-If you know the Sid of your usage trigger, retrieving it is easy.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- $usageSid = 'UT123';
- $usageTrigger = $client->account->usage_triggers->get($usageSid);
- echo $usageTrigger->usage_category;
-
-Update Properties on a UsageTrigger
-===================================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- $usageSid = 'UT123';
- $usageTrigger = $client->account->usage_triggers->get($usageSid);
- $usageTrigger->update(array(
- 'FriendlyName' => 'New usage trigger friendly name',
- 'CallbackUrl' => 'http://example.com/new-trigger-url',
- ));
-
-Retrieve All Triggers
-=====================
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_triggers as $trigger) {
- echo "Category: {$trigger->usage_category}\nTriggerValue: {$trigger->trigger_value}\n";
- }
-
-Filter Trigger List By Category
-===============================
-
-Pass filters to the `getIterator` function to create a filtered list.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- foreach ($client->account->usage_triggers->getIterator(
- 0, 50, array(
- 'UsageCategory' => 'sms',
- )) as $trigger
- ) {
- echo "Value: " . $trigger->trigger_value . "\n";
- }
-
-Create a New Trigger
-====================
-
-Pass a usage category, a value and a callback URL to the `create` method.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- $trigger = $client->account->usage_triggers->create(
- 'totalprice',
- '250.75',
- 'http://example.com/usage'
- );
-
-Create a Recurring Trigger
-==========================
-
-To have your trigger reset once every day, month, or year, pass the
-`Recurring` key as part of the params array. A list of optional
-trigger parameters can be found in the `Usage Triggers Documentation
-<http://www.twilio.com/docs/api/rest/usage-triggers#list-post-optional-paramete
-rs>`_.
-
-.. code-block:: php
-
- $client = new Services_Twilio('AC123', '456bef');
- $trigger = $client->account->usage_triggers->create(
- 'totalprice',
- '250.75',
- 'http://example.com/usage',
- array('Recurring' => 'monthly', 'TriggerBy' => 'price')
- );
-
diff --git a/docs/usage/taskrouter.rst b/docs/usage/taskrouter.rst
deleted file mode 100644
index 79a86d6..0000000
--- a/docs/usage/taskrouter.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _usage-taskrouter:
-
-================================
-Getting Started with TaskRouter
-================================
-Twilio TaskRouter enables you to manage a set of Workers, a set of Tasks, and the configuration that determines how the Tasks are matched and distributed to Workers.
-
-Creating a TaskRouter Client
-==============================
-
-It is necessary to first create a TaskRouter_Services_Twilio instance. You will need your Twilio account's Account Sid and Auth Token, which are available under your Twilio Account Dashboard.
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- // set accountSid and authToken
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
-
- // set the workspaceSid
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
-If you do not have a workspace to specify, you can pass in **null** for the workspaceSid parameter as follows:
-
-.. code-block:: php
-
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, null);
-
-
-You've now got a Twilio TaskRouter Client up! You can now do things like create a worker, update a task, or reconfigure your workspace amongst other things.
-
diff --git a/docs/usage/taskrouter/activities.rst b/docs/usage/taskrouter/activities.rst
deleted file mode 100644
index bdafba1..0000000
--- a/docs/usage/taskrouter/activities.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-===========
-Activities
-===========
-
-Activities describe the current status of your Workers, which determines whether they are eligible to receive task assignments. Workers are always set to a single Activity.
-
-Creating an Activity
-==============================
-
-You can create a new activity by specifying its friendly name and availability.
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set activity parameters
- $friendlyName = 'New Activity';
- $activityAvailability = 'false';
-
- // create an activity
- $activity = $taskrouterClient->workspace->activities->create(
- $friendlyName,
- $activityAvailability
- );
-
- // confirm activity created
- echo "Created Activity: ".$activity->sid;
-
-Updating an Activity
-==============================
-
-Updates to an activity are restricted to only the FriendlyName
-
-.. code-block:: php
-
- $activitySid = 'YOUR_ACTIVITY_SID';
-
- // updated activity parameters
- $updatedActivityFriendlyName = "Updated Activity Name";
-
- // updated activity
- $taskrouterClient->workspace->activities->get($activitySid)->update(
- array(
- 'FriendlyName' => $updatedActivityFriendlyName
- )
- );
-
- echo 'Updated Activity: '.$activitySid;
-
-Deleting an Activity
-==============================
-
-Deleting an activity is just as easy as creating an activity. Simple make a call to delete and pass in the sid of the activity.
-
-.. code-block:: php
-
- $activitySid = 'YOUR_ACTIVITY_SID';
-
- $taskrouterClient->workspace->activities->delete($activitySid);
-
- echo 'Deleted Activity: '.$activitySid;
-
-Get a List of all Activities
-==============================
-
-You can also loop through the list of all activities in a workspace.
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->activities as $activity)
- {
- echo $activity->sid;
- }
-
- \ No newline at end of file
diff --git a/docs/usage/taskrouter/events.rst b/docs/usage/taskrouter/events.rst
deleted file mode 100644
index 3f2b302..0000000
--- a/docs/usage/taskrouter/events.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-===========
-Events
-===========
-
-TaskRouter logs Events for each state change in the Workspace for the purpose of historical reporting and auditing. TaskRouter will also make an HTTP request containing the Event details to the Workspace's EventCallbackURL each time one these Events takes place.
-
-Get an Event
-=====================
-
-You can get details on a specific event by doing the following:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $eventSid = 'YOUR_EVENT_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // fetch workspace statistics
- $event = taskrouterClient->workspace->events->get($eventSid);
-
-
-Get a List of all Events
-==============================
-
-You can also loop through the list of all events in a workspace.
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->events as $event)
- {
- echo $event->sid;
- } \ No newline at end of file
diff --git a/docs/usage/taskrouter/reservations.rst b/docs/usage/taskrouter/reservations.rst
deleted file mode 100644
index 7114e9d..0000000
--- a/docs/usage/taskrouter/reservations.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-=============
-Reservations
-=============
-
-TaskRouter creates a Task Reservation subresource whenever a Task is assigned to a Worker. TaskRouter will provide the details of this Reservation Instance subresource in the Assignment Callback HTTP request it makes to your application server. You must POST **ReservationStatus=accepted** or **ReservationStatus=rejected** to this resource within the reservation timeout to claim or reject this task.
-
-
-Update a Reservation
-=======================
-
-TO indicate that a Worker has accepted or rejected a Task, you can:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
- $taskSid = 'YOUR_TASK_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set reservation parameters
- $reservationStatus = 'accepted';
-
- // update the reservation status
- $taskrouterClient->workspace->tasks->get($taskSid)->reservations->get($reservationSid)->update('ReservationStatus', $reservationStatus); \ No newline at end of file
diff --git a/docs/usage/taskrouter/statistics.rst b/docs/usage/taskrouter/statistics.rst
deleted file mode 100644
index 4494deb..0000000
--- a/docs/usage/taskrouter/statistics.rst
+++ /dev/null
@@ -1,104 +0,0 @@
-===========
-Statistics
-===========
-
-TaskRouter provides real time and historical statistics for each Workspace subresource. Real time statistics allow you to check the current state of the system (tasks, workers, queues). Historical statistics allow you to analyze the efficiency of your Workflows, TaskQueues and Workers.
-
-
-Workspace Statistics
-=====================
-
-You can get workspace statistics by doing the following:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // fetch workspace statistics
- $stats = taskrouterClient->getWorkspaceStatistics(array('Minutes' => 60));
-
- // confirm stats
- echo $stats->account_sid;
-
-
-Workflow Statistics
-=====================
-
-You can get workflow statistics by doing the following:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $workflowSid = 'YOUR_WORKFLOW_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // fetch workspace statistics
- $stats = taskrouterClient->getWorkflowStatistics($workflowSid, array('Minutes' => 60));
-
- // confirm stats
- echo $stats->account_sid;
-
-
-Worker Statistics
-=====================
-
-You can get worker statistics by doing the following:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $workerSid = 'YOUR_WORKER_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // fetch workspace statistics
- $stats = $taskrouterClient->getWorkerStatistics($workerSid, array('Minutes' => 60));
-
- // confirm stats
- echo $stats->account_sid;
-
-
-TaskQueue Statistics
-=====================
-
-You can get task queue statistics by doing the following:
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $taskQueueSid = 'YOUR_TASK_QUEUE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // fetch workspace statistics
- $stats = $taskrouterClient->getTaskQueueStatistics($taskQueueSid, array('Minutes' => 60));
-
- // confirm stats
- echo $stats->account_sid;
-
diff --git a/docs/usage/taskrouter/task-queues.rst b/docs/usage/taskrouter/task-queues.rst
deleted file mode 100644
index 69f3d9f..0000000
--- a/docs/usage/taskrouter/task-queues.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-===========
-Task Queues
-===========
-
-TaskQueues are the resource you use to categorize Tasks and describe which Workers are eligible to handle those Tasks. As your Workflows process Tasks, those Tasks will pass through one or more TaskQueues until the Task is assigned and accepted by an eligible Worker.
-
-Creating a Task Queue
-==============================
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set taskQ parameters
- $friendlyName = "FrenchQ";
- $assignmentActivitySid = 'YOUR_ASSIGNMENT_ACTIVITY_SID';
- $reservationActivitySid = 'YOUR_RESERVATION_ACTIVITY_SID';
- $targetWorkers = 'languages HAS "fr"';
-
- $taskQ = $taskrouterClient->workspace->task_queues->create(
- $friendlyName,
- $assignmentActivitySid,
- $reservationActivitySid,
- array(
- "TargetWorkers" => $targetWorkers
- )
- );
-
- // confirm task queue created
- echo 'Created TaskQ: '.$taskQ->sid;
-
-Updating a Task Queue
-==============================
-
-In this example, we update the above task queue to now accept tasks which have a language attribute of french or swedish, or both.
-
-
-.. code-block:: php
-
- $taskQSid = 'YOUR_TASK_QUEUE_SID';
-
- // updated taskQ parameters
- $updatedFriendlyName = "French and Swedish Q";
- $updatedTargetWorkers = 'languages HAS "fr" and languages has "sv"';
-
- //update taskQ
- $taskrouterClient->workspace->task_queues->get($taskQSid)->update(
- array(
- 'FriendlyName'=> $updatedFriendlyName,
- 'TargetWorkers'=> $updatedTargetWorkers
- )
- );
-
- echo 'Updated Task Queue: '.$taskQSid;
-
-
-Deleting a Task Queue
-==============================
-
-.. code-block:: php
-
- $taskQSid = 'YOUR_TASK_QUEUE_SID';
-
- $taskrouterClient->workspace->task_queues->delete($taskQSid);
-
- echo 'Deleted Task Queue: '.$taskQSid;
-
-
-Get a List of all Task Queues
-==============================
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->task_queues as $taskQ)
- {
- echo $taskQ->sid;
- }
-
- \ No newline at end of file
diff --git a/docs/usage/taskrouter/tasks.rst b/docs/usage/taskrouter/tasks.rst
deleted file mode 100644
index e3720b1..0000000
--- a/docs/usage/taskrouter/tasks.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-===========
-Tasks
-===========
-
-A Task instance resource represents a single item of work waiting to be processed. Tasks can represent whatever type of work is important for your team. Twilio applications can create tasks from phone calls or SMS messages.
-
-Creating a Task
-==============================
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set task parameters
- $workflowSid = 'YOUR_WORKFLOW_SID';
- $taskAttributes = '{"selected_language": "fr"}';
- $prioity = 10;
- $timeout = 100;
-
- // create task
- $task = $taskrouterClient->workspace->tasks->create(
- $taskAttributes,
- $workflowSid,
- array(
- 'Priority' => $priority,
- 'Timeout' => $timeout
- )
- );
-
- // confirm task created
- echo "Created Task: ".$task->sid;
-
-Updating a Task
-==============================
-
-Here, we modify the above created task to have an updated priority of 20 and contains Swedish instead of French.
-
-.. code-block:: php
-
- $taskSid = 'YOUR_TASK_SID';
-
- // update task parameters
- $updatedTaskAttributes = '{"languages":"sv"}';
- $updatedPriority = 20;
-
- // update task
- $taskrouterClient->workspace->tasks->get($taskSid)->update(
- array(
- 'Attributes'=> $updatedTaskAttributes,
- 'Priority'=> $updatedPriority
- )
- );
-
- echo 'Updated Task: '.$taskSid;
-
-
-Deleting a Task
-==============================
-
-.. code-block:: php
-
- $taskSid = 'YOUR_TASK_SID';
-
- $taskrouterClient->workspace->tasks->delete($taskSid);
-
- echo 'Deleted Task: '.$taskSid;
-
-
-Get a List of all Tasks
-==============================
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->tasks as $task)
- {
- echo $task->sid;
- }
-
- \ No newline at end of file
diff --git a/docs/usage/taskrouter/workers.rst b/docs/usage/taskrouter/workers.rst
deleted file mode 100644
index 4e61a6b..0000000
--- a/docs/usage/taskrouter/workers.rst
+++ /dev/null
@@ -1,81 +0,0 @@
-===========
-Workers
-===========
-
-Workers represent an entity that is able to perform tasks, such as an agent working in a call center, or a salesperson handling leads.
-
-Creating a Worker
-==============================
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set worker parameters
- $friendlyName = 'Bob';
- $activitySid = 'YOUR_ACTIVITY_SID';
- $workerAttributes = '{"languages":"fr"}';
-
- $worker = $taskrouterClient->workspace->workers->create(
- $friendlyName,
- array(
- 'Attributes' => $workerAttributes,
- 'ActivitySid' => $idleActivitySid
- )
- );
-
- // confirm worker created
- echo "Created Worker: ".$worker.sid;
-
-Updating a Worker
-==============================
-
-This update changes the worker above to now be able to handle additional tasks, specfically, tasks that have a language attribute = "sv".
-
-.. code-block:: php
-
- $workerSid = 'YOUR_WORKER_SID';
-
- // set updated worker parameters
- $updatedWorkerAttributes = '{"language": ["fr", "sv"]}';
-
- // update worker
- $taskrouterClient->workspace->workers->get($workerSid)->update(
- array(
- 'Attributes' => $updatedWorkerAttributes
- )
- );
-
- echo 'Updated Worker: '.$workerSid;
-
-
-Deleting a Worker
-==============================
-
-.. code-block:: php
-
- $workerSid = 'YOUR_WORKER_SID';
-
- $taskrouterClient->workspace->workers->delete($workerSid);
-
- echo 'Deleted Worker: '.$workerSid;
-
-
-Get a List of all Workers
-==============================
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->workers as $worker)
- {
- echo $worker->sid;
- }
-
- \ No newline at end of file
diff --git a/docs/usage/taskrouter/workflows.rst b/docs/usage/taskrouter/workflows.rst
deleted file mode 100644
index ea0a5d1..0000000
--- a/docs/usage/taskrouter/workflows.rst
+++ /dev/null
@@ -1,87 +0,0 @@
-===========
-Workflows
-===========
-
-Workflows control how tasks will be prioritized and routed into Queues, and how Tasks should escalate in priority or move across queues over time. Workflows are described in a simple JSON format and can be modified through the REST API or through the account portal.
-
-Creating a Workflow
-==============================
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // set workflow parameters
- $friendlyName = 'Example Workflow';
- $configuration = '{"task_routing":{"default_filter":{"task_queue_sid":"YOUR_TASK_QUEUE_SID"}}}';
- $assignmentCallbackUrl = 'http://exampleCallbackUrl.org';
- $fallbackAssignmentCallbackUrl = 'http://exampleFallbackUrl.org';
- $taskReservationTimeout = 50;
-
- // create a Workflow
- $workflow = $taskrouterClient->workspace->workflows->create(
- $friendlyName,
- $configuration,
- $assignmentCallbackUrl,
- array(
- 'FallbackAssignmentCallbackUrl' => $fallbackAssignmentCallbackUrl,
- 'TaskReservationTimeout' => $taskReservationTimeout
- )
- );
-
- // confirm workflow created
- echo 'Created Workflow: '.$workflow->sid;
-
-Updating a Workflow
-==============================
-
-This example updates the above workflow's configuration and task reservation timeout.
-
-.. code-block:: php
-
- $workflowSid = 'YOUR_WORKFLOW_SID';
-
- // updated workflow parameters
- $updatedConfiguration = '{"task_routing":{"default_filter":{"task_queue_sid" : "YOUR_UPDATED_TASK_QUEUE_SID"}}}';
- $updatedFallbackAssignmentUrl = 'http://updatedFallbackAssignmentUrl.org';
- $updatedTaskReservationTimeout = 150;
-
- // update workflow
- $taskrouterClient->workspace->workflows->get($workflowSid)->update(
- array(
- 'Configuration' => $updatedConfiguration,
- 'TaskReservationTimeout' => $updatedTaskReservationTimeout
- )
- );
-
- echo 'Updated Workflow: '.$workflowSid;
-
-
-Deleting a Workflow
-==============================
-
-.. code-block:: php
-
- $workflowSid = 'YOUR_WORKFLOW_SID';
- $taskrouterClient->workspace->workflows->delete($workflowSid);
- echo 'Deleted Workflow: '.$workflowSid;
-
-
-Get a List of all Workflows
-==============================
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspace->workflows as $workflow)
- {
- echo $workflow->sid;
- }
-
- \ No newline at end of file
diff --git a/docs/usage/taskrouter/workspaces.rst b/docs/usage/taskrouter/workspaces.rst
deleted file mode 100644
index 18f01c1..0000000
--- a/docs/usage/taskrouter/workspaces.rst
+++ /dev/null
@@ -1,77 +0,0 @@
-===========
-Workspaces
-===========
-
-A Workspace is a container for your Tasks, Workers, TaskQueues, Workflows and Activities. Each of these items exists within a single Workspace and will not be shared across Workspaces.
-
-Creating a Workspace
-==============================
-
-.. code-block:: php
-
- require 'Services/Twilio.php';
-
- // set account parameters
- $accountSid = 'YOUR_ACCOUNT_SID';
- $authToken = 'YOUR_AUTH_TOKEN';
-
- // instantiate a Twilio TaskRouter Client
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, null);
-
- // create a workspace
- $workspace = $taskrouterClient->createWorkspace(
- $accountSid, // AccountSid
- $authToken, // AuthToken
- $friendlyName // name for workspace
- );
-
- // confirm workspace created
- echo 'Created Workspace: '.$workspace->sid;
-
-Updating a Workspace
-==============================
-
-This update below alters the workspace to a new FriendlyName and EventCallbackUrl.
-
-.. code-block:: php
-
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $taskrouterClient = new TaskRouter_Services_Twilio($accountSid, $authToken, $workspaceSid);
-
- // updated workspace parameters
- $updatedFriendlyName = 'My Updated Workspace';
- $updatedEventCallbackUrl = 'http://updatedEventCallbackUrl.org';
-
- // update workspace
- $taskrouterClient->workspace->update(
- array(
- 'FriendlyName' => $updatedFriendlyName,
- 'EventCallbackUrl' => $updatedEventCallbackUrl
- )
- );
-
- echo 'Updated Workspace: '.$workspaceSid;
-
-
-Deleting a Workspace
-==============================
-
-.. code-block:: php
-
- $workspaceSid = 'YOUR_WORKSPACE_SID';
-
- $taskrouterClient->workspaces->delete($workspaceSid);
-
- echo 'Deleted Workspace: '.$workspaceSid;
-
-
-Get a List of all Workspaces
-==============================
-
-.. code-block:: php
-
- foreach($taskrouterClient->workspaces as $workspace)
- {
- echo $workspace->sid;
- }
diff --git a/docs/usage/token-generation.rst b/docs/usage/token-generation.rst
deleted file mode 100644
index 0d031b5..0000000
--- a/docs/usage/token-generation.rst
+++ /dev/null
@@ -1,64 +0,0 @@
-===========================
-Generate Capability Tokens
-===========================
-
-`Twilio Client <http://www.twilio.com/api/client>`_ allows you to make and recieve connections in the browser. You can place a call to a phone on the PSTN network, all without leaving your browser. See the `Twilio Client Quickstart <http:/www.twilio.com/docs/quickstart/client>`_ to get up and running with Twilio Client.
-
-Capability tokens are used by `Twilio Client <http://www.twilio.com/api/client>`_ to provide connection security and authorization. The `Capability Token documentation <http://www.twilio.com/docs/client/capability-tokens>`_ explains indepth the purpose and features of these tokens.
-
-:php:class:`Services_Twilio_Capability` is responsible for the creation of these capability tokens. You'll need your Twilio AccountSid and AuthToken.
-
-.. code-block:: php
-
- require('/path/to/twilio-php/Services/Twilio/Capability.php');
-
- $accountSid = "AC123123";
- $authToken = "secret";
-
- $capability = new Services_Twilio_Capability($accountSid, $authToken);
-
-
-Allow Incoming Connections
-==============================
-
-Before a device running `Twilio Client <http://www.twilio.com/api/client>`_ can recieve incoming connections, the instance must first register a name (such as "Alice" or "Bob"). The :php:meth:`allowCclientIncoming` method adds the client name to the capability token.
-
-.. code-block:: php
-
- $capability->allowClientIncoming("Alice");
-
-
-Allow Outgoing Connections
-==============================
-
-To make an outgoing connection from a `Twilio Client <http://www.twilio.com/api/client>`_ device, you'll need to choose a `Twilio Application <http://www.twilio.com/docs/api/rest/applications>`_ to handle TwiML URLs. A Twilio Application is a collection of URLs responsible for outputing valid TwiML to control phone calls and SMS.
-
-.. code-block:: php
-
- $applicationSid = "AP123123"; // Twilio Application Sid
- $capability->allowClientOutgoing($applicationSid);
-
-:php:meth:`allowClientOutgoing` accepts an optional array of parameters. These parameters will be passed along when Twilio requests TwiML from the application.
-
-.. code-block:: php
-
- $applicationSid = "AP123123"; // Twilio Application Sid
- $params = array("Foo" => "Bar"); // Parameters to be passed
- $capability->allowClientOutgoing($applicationSid, $params);
-
-
-Generate a Token
-==================
-
-.. code-block:: php
-
- $token = $capability->generateToken();
-
-By default, this token will expire in one hour. If you'd like to change the token expiration time, :php:meth:`generateToken` takes an optional argument which specifies `time to live` in seconds.
-
-.. code-block:: php
-
- $token = $capability->generateToken(600);
-
-This token will now expire in 10 minutes.
-
diff --git a/docs/usage/twiml.rst b/docs/usage/twiml.rst
deleted file mode 100644
index 892735c..0000000
--- a/docs/usage/twiml.rst
+++ /dev/null
@@ -1,347 +0,0 @@
-.. _usage-twiml:
-
-==============
-TwiML Creation
-==============
-
-TwiML creation begins with the :class:`Services_Twilio_Twiml` verb. Each
-succesive verb is created by calling various methods on the response, such as
-:meth:`say` or :meth:`play`. These methods return the verbs they create to ease
-the creation of nested TwiML.
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->say('Hello');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Say>Hello</Say>
- <Response>
-
-Primary Verbs
-=============
-
-Response
---------
-
-All TwiML starts with the `<Response>` verb. The following code creates an empty response.
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response></Response>
-
-Say
----
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->say("Hello World");
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Say>Hello World</Say>
- </Response>
-
-Play
-----
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->play("https://api.twilio.com/cowbell.mp3", array('loop' => 5));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Play loop="5">https://api.twilio.com/cowbell.mp3</Play>
- <Response>
-
-Gather
-------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $gather = $response->gather(array('numDigits' => 5));
- $gather->say("Hello Caller");
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Gather numDigits="5">
- <Say>Hello Caller</Say>
- </Gather>
- <Response>
-
-Record
-------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->record(array(
- 'action' => 'http://foo.com/path/to/redirect',
- 'maxLength' => 20
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Record action="http://foo.com/path/to/redirect" maxLength="20"/>
- </Response>
-
-Message
--------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->message('Hello World', array(
- 'to' => '+14150001111',
- 'from' => '+14152223333'
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Message to="+14150001111" from="+14152223333">Hello World</Message>
- </Response>
-
-Dial
-----
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->dial('+14150001111', array(
- 'callerId' => '+14152223333'
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Dial callerId="+14152223333">+14150001111</Dial>
- </Response>
-
-Number
-~~~~~~
-
-Dial out to phone numbers easily.
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $dial = $response->dial(NULL, array(
- 'callerId' => '+14152223333'
- ));
- $dial->number('+14151112222', array(
- 'sendDigits' => '2'
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Dial callerId="+14152223333">
- <Number sendDigits="2">+14151112222</Number>
- </Dial>
- </Response>
-
-Client
-~~~~~~
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $dial = $response->dial(NULL, array(
- 'callerId' => '+14152223333'
- ));
- $dial->client('client-id');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Dial callerId="+14152223333">
- <Client>client-id</Client>
- </Dial>
- </Response>
-
-Conference
-~~~~~~~~~~
-
-.. code-block:: php
-
- require("Services/Twilio.php");
- $response = new Services_Twilio_Twiml;
- $dial = $response->dial();
- $dial->conference('Customer Waiting Room', array(
- "startConferenceOnEnter" => "true",
- "muted" => "true",
- "beep" => "false",
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Dial>
- <Conference startConferenceOnEnter="true" muted="true" beep="false">
- Customer Waiting Room
- </Conference>
- </Dial>
- </Response>
-
-Sip
-~~~
-
-To dial out to a Sip number, put the Sip address in the `sip()` method call.
-
-.. code-block:: php
-
- require("Services/Twilio.php");
- $response = new Services_Twilio_Twiml;
- $dial = $response->dial();
- $sip = $dial->sip();
- $sip->uri('alice@foo.com?X-Header-1=value1&X-Header-2=value2', array(
- "username" => "admin",
- "password" => "1234",
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF‐8"?>
- <Response>
- <Dial>
- <Sip>
- <Uri username='admin' password='1234'>
- alice@foo.com?X-Header-1=value1&X-Header-2=value2
- </Uri>
- </Sip>
- </Dial>
- </Response>
-
-
-Secondary Verbs
-===============
-
-Hangup
-------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->hangup();
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Hangup />
- </Response>
-
-Redirect
---------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->redirect('http://twimlets.com/voicemail?Email=somebody@somedomain.com');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Redirect>http://twimlets.com/voicemail?Email=somebody@somedomain.com</Redirect>
- </Response>
-
-
-Reject
-------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->reject(array(
- 'reason' => 'busy'
- ));
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Reject reason="busy" />
- </Response>
-
-
-Pause
------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->say('Hello');
- $response->pause("");
- $response->say('World');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Say>Hello</Say>
- <Pause />
- <Say>World</Say>
- </Response>
-
-Enqueue
--------
-
-.. code-block:: php
-
- $response = new Services_Twilio_Twiml;
- $response->say("You're being added to the queue.");
- $response->enqueue('queue-name');
- print $response;
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Say>You're being added to the queue.</Say>
- <Enqueue>queue-name</Enqueue>
- </Response>
-
-The verb methods (outlined in the complete reference) take the body (only text)
-of the verb as the first argument. All attributes are keyword arguments.
diff --git a/docs/usage/validation.rst b/docs/usage/validation.rst
deleted file mode 100644
index b361f3b..0000000
--- a/docs/usage/validation.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-===========================
-Validate Incoming Requests
-===========================
-
-Twilio requires that your TwiML-serving web server be open to the public. This is necessary so that Twilio can retrieve TwiML from urls and POST data back to your server.
-
-However, there may be people out there trying to spoof the Twilio service. Luckily, there's an easy way to validate that incoming requests are from Twilio and Twilio alone.
-
-An `indepth guide <http://www.twilio.com/docs/security>`_ to our security features can be found in our online documentation.
-
-Before you can validate requests, you'll need four pieces of information
-
-* your Twilio Auth Token
-* the POST data for the request
-* the requested URL
-* the X-Twilio-Signature header value
-
-Get your Auth Token from the `Twilio User Dashboard <https://www.twilio.com/user/account>`_.
-
-Obtaining the other three pieces of information depends on the framework of your choosing. I will assume that you have the POST data as an array and the url and X-Twilio-Signature as strings.
-
-The below example will print out a confirmation message if the request is actually from Twilio.com
-
-.. code-block:: php
-
- // Your auth token from twilio.com/user/account
- $authToken = '12345';
-
- // Download the twilio-php library from twilio.com/docs/php/install, include it
- // here
- require_once('/path/to/twilio-php/Services/Twilio.php');
- $validator = new Services_Twilio_RequestValidator($authToken);
-
- // The Twilio request URL. You may be able to retrieve this from
- // $_SERVER['SCRIPT_URI']
- $url = 'https://mycompany.com/myapp.php?foo=1&bar=2';
-
- // The post variables in the Twilio request. You may be able to use
- // $postVars = $_POST
- $postVars = array(
- 'CallSid' => 'CA1234567890ABCDE',
- 'Caller' => '+14158675309',
- 'Digits' => '1234',
- 'From' => '+14158675309',
- 'To' => '+18005551212'
- );
-
- // The X-Twilio-Signature header - in PHP this should be
- // $_SERVER["HTTP_X_TWILIO_SIGNATURE"];
- $signature = 'RSOYDt4T1cUTdK1PDd93/VVr8B8=';
-
- if ($validator->validate($signature, $url, $postVars)) {
- echo "Confirmed to have come from Twilio.";
- } else {
- echo "NOT VALID. It might have been spoofed!";
- }
-
-Trailing Slashes
-==================
-
-If your URL uses an "index" page, such as index.php or index.html to handle the request, such as: https://mycompany.com/twilio where the real page is served from https://mycompany.com/twilio/index.php, then Apache or PHP may rewrite that URL a little bit so it's got a trailing slash... https://mycompany.com/twilio/ for example.
-
-Using the code above, or similar code in another language, you could end up with an incorrect hash because, Twilio built the hash using https://mycompany.com/twilio and you may have built the hash using https://mycompany.com/twilio/.
-
-
-