src/Api/Request/Application/RateLimitStatus.php 1 location
|
@@ 10-27 (lines=18) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/application/rate_limit_status |
| 9 |
|
*/ |
| 10 |
|
class RateLimitStatus extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
|
| 14 |
|
const ENDPOINT = '/application/rate_limit_status.json'; |
| 15 |
|
|
| 16 |
|
public function __construct() |
| 17 |
|
{ |
| 18 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
public function filterResources(array $resources): RateLimitStatus |
| 22 |
|
{ |
| 23 |
|
$this->parameters['resources'] = implode(',', $resources); |
| 24 |
|
|
| 25 |
|
return $this; |
| 26 |
|
} |
| 27 |
|
} |
| 28 |
|
|
src/Api/Request/Collection/Show.php 1 location
|
@@ 10-22 (lines=13) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/collections/show |
| 9 |
|
*/ |
| 10 |
|
class Show extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
|
| 14 |
|
const ENDPOINT = '/collections/show.json'; |
| 15 |
|
|
| 16 |
|
public function __construct(string $id) |
| 17 |
|
{ |
| 18 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 19 |
|
|
| 20 |
|
$this->parameters['id'] = $id; |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|
src/Api/Request/DirectMessage/Show.php 1 location
|
@@ 10-22 (lines=13) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/direct_messages/show |
| 9 |
|
*/ |
| 10 |
|
class Show extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
|
| 14 |
|
const ENDPOINT = '/direct_messages/show.json'; |
| 15 |
|
|
| 16 |
|
public function __construct(int $id) |
| 17 |
|
{ |
| 18 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 19 |
|
|
| 20 |
|
$this->parameters['id'] = (string) $id; |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|
src/Api/Request/Friendship/NoRetweet/Ids.php 1 location
|
@@ 10-27 (lines=18) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/friendships/no_retweets/ids |
| 9 |
|
*/ |
| 10 |
|
class Ids extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
|
| 14 |
|
const ENDPOINT = '/friendships/no_retweets/ids.json'; |
| 15 |
|
|
| 16 |
|
public function __construct() |
| 17 |
|
{ |
| 18 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
public function stringifyIds(): Ids |
| 22 |
|
{ |
| 23 |
|
$this->parameters['stringify_ids'] = 'true'; |
| 24 |
|
|
| 25 |
|
return $this; |
| 26 |
|
} |
| 27 |
|
} |
| 28 |
|
|
src/Api/Request/Lists/Lists.php 1 location
|
@@ 10-26 (lines=17) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/lists/list |
| 9 |
|
*/ |
| 10 |
|
abstract class Lists extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
const ENDPOINT = '/lists/list.json'; |
| 14 |
|
|
| 15 |
|
public function __construct() |
| 16 |
|
{ |
| 17 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function reverse(): Lists |
| 21 |
|
{ |
| 22 |
|
$this->parameters['reverse'] = 'true'; |
| 23 |
|
|
| 24 |
|
return $this; |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Api/Request/Status/Destroy.php 1 location
|
@@ 10-26 (lines=17) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/post/statuses/destroy/id |
| 9 |
|
*/ |
| 10 |
|
class Destroy extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'POST'; |
| 13 |
|
const ENDPOINT = '/statuses/destroy/%s.json'; |
| 14 |
|
|
| 15 |
|
public function __construct(int $id) |
| 16 |
|
{ |
| 17 |
|
parent::__construct(self::METHOD, sprintf(self::ENDPOINT, $id)); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function trimUser(): Destroy |
| 21 |
|
{ |
| 22 |
|
$this->parameters['trim_user'] = 'true'; |
| 23 |
|
|
| 24 |
|
return $this; |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Api/Request/Status/Retweet.php 1 location
|
@@ 10-26 (lines=17) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/post/statuses/retweet/id |
| 9 |
|
*/ |
| 10 |
|
class Retweet extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'POST'; |
| 13 |
|
const ENDPOINT = '/statuses/retweet/%s.json'; |
| 14 |
|
|
| 15 |
|
public function __construct(int $id) |
| 16 |
|
{ |
| 17 |
|
parent::__construct(self::METHOD, sprintf(self::ENDPOINT, $id)); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function trimUser(): Retweet |
| 21 |
|
{ |
| 22 |
|
$this->parameters['trim_user'] = 'true'; |
| 23 |
|
|
| 24 |
|
return $this; |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Api/Request/Status/UnRetweet.php 1 location
|
@@ 10-26 (lines=17) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/post/statuses/unretweet/id |
| 9 |
|
*/ |
| 10 |
|
class UnRetweet extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'POST'; |
| 13 |
|
const ENDPOINT = '/statuses/unretweet/%s.json'; |
| 14 |
|
|
| 15 |
|
public function __construct(int $id) |
| 16 |
|
{ |
| 17 |
|
parent::__construct(self::METHOD, sprintf(self::ENDPOINT, $id)); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function trimUser(): UnRetweet |
| 21 |
|
{ |
| 22 |
|
$this->parameters['trim_user'] = 'true'; |
| 23 |
|
|
| 24 |
|
return $this; |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Api/Request/Trend/Closest.php 1 location
|
@@ 10-22 (lines=13) @@
|
| 7 |
|
/** |
| 8 |
|
* @link https://dev.twitter.com/rest/reference/get/trends/closest |
| 9 |
|
*/ |
| 10 |
|
class Closest extends BaseRequest |
| 11 |
|
{ |
| 12 |
|
const METHOD = 'GET'; |
| 13 |
|
const ENDPOINT = '/trends/closest.json'; |
| 14 |
|
|
| 15 |
|
public function __construct(string $latitude, string $longitude) |
| 16 |
|
{ |
| 17 |
|
parent::__construct(self::METHOD, self::ENDPOINT); |
| 18 |
|
|
| 19 |
|
$this->parameters['lat'] = $latitude; |
| 20 |
|
$this->parameters['long'] = $longitude; |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|