[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/externals/twilio-php/docs/usage/rest/ -> conferences.rst (source)

   1  =============
   2   Conferences
   3  =============
   4  
   5  List All Conferences
   6  ====================
   7  
   8  .. code-block:: php
   9  
  10      $client = new Services_Twilio('AC123', '123');
  11      foreach ($client->account->conferences as $conference) {
  12          print $conference->friendly_name;
  13      }
  14  
  15  For a full list of properties available on a conference, as well as a full list
  16  of ways to filter a conference, please see the `Conference API Documentation
  17  <http://www.twilio.com/docs/api/rest/conference>`_ on our website.
  18  
  19  Filter Conferences by Status
  20  ============================
  21  
  22  .. code-block:: php
  23  
  24      $client = new Services_Twilio('AC123', '123');
  25      foreach ($client->account->conferences->getIterator(0, 50, array(
  26        'Status' => 'in-progress'
  27      )) as $conf) {
  28        print $conf->sid;
  29      }
  30  
  31  Mute all participants
  32  =====================
  33  
  34  At the moment, using an iterator directly will cause this method to infinitely
  35  loop. Instead, use the getPage function. As conferences are limited to 40
  36  participants, getPage(0, 50) should return a list of every participant in
  37  a conference.
  38  
  39  .. code-block:: php
  40  
  41      $sid = "CO119231312";
  42      $client = new Services_Twilio('AC123', '123');
  43      $conference = $client->account->conferences->get($sid);
  44      $page = $conference->participants->getPage(0, 50);
  45      $participants = $page->participants;
  46      foreach ($participants as $p) {
  47        $p->mute();
  48      }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1