1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00
phorge-phorge/externals/twilio-php/Services/Twilio/Rest/Media.php
Bob Trahan e96c363eef Add SMS support
Summary:
Provides a working SMS implementation with support for Twilio.

This version doesn't really retry if we get any gruff at all. Future versions should retry.

Test Plan: used bin/sms to send messages and look at them.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: aurelijus, epriestley, Korvin

Maniphest Tasks: T920

Differential Revision: https://secure.phabricator.com/D8930
2014-05-09 12:47:21 -07:00

31 lines
949 B
PHP
Executable file

<?php
/**
* A list of :class:`Media <Services_Twilio_Rest_MediaInstance>` objects.
* For the definitive reference, see the `Twilio Media List Documentation
* <https://www.twilio.com/docs/api/rest/media>`_.
*/
class Services_Twilio_Rest_Media extends Services_Twilio_ListResource {
// This is overridden because the list key in the Twilio response
// is "media_list", not "media".
public function getResourceName($camelized = false)
{
if ($camelized) {
return "MediaList";
} else {
return "media_list";
}
}
// We manually set the instance name here so that the parent
// constructor doesn't attempt to figure out it. It would do it
// incorrectly because we override getResourceName above.
public function __construct($client, $uri) {
$this->instance_name = "Services_Twilio_Rest_MediaInstance";
parent::__construct($client, $uri);
}
}