@@ -71,11 +71,6 @@ class Codebird
71
71
*/
72
72
private static $ _endpoint_oauth = 'https://api.twitter.com/ ' ;
73
73
74
- /**
75
- * The API endpoint to use for untransitioned methods
76
- */
77
- private static $ _endpoint_old = 'https://api.twitter.com/1/ ' ;
78
-
79
74
/**
80
75
* The Request or access token. Used to sign requests
81
76
*/
@@ -492,6 +487,7 @@ private function _detectMethod($method, $params)
492
487
'statuses/user_timeline ' ,
493
488
'statuses/home_timeline ' ,
494
489
'statuses/retweets_of_me ' ,
490
+ 'statuses/sample ' ,
495
491
496
492
// Tweets
497
493
'statuses/retweets/:id ' ,
@@ -507,6 +503,7 @@ private function _detectMethod($method, $params)
507
503
'direct_messages/show ' ,
508
504
509
505
// Friends & Followers
506
+ 'friendships/no_retweets/ids ' ,
510
507
'friends/ids ' ,
511
508
'followers/ids ' ,
512
509
'friendships/lookup ' ,
@@ -571,10 +568,7 @@ private function _detectMethod($method, $params)
571
568
'help/languages ' ,
572
569
'help/privacy ' ,
573
570
'help/tos ' ,
574
- 'application/rate_limit_status ' ,
575
-
576
- // Old
577
- 'users/recommendations '
571
+ 'application/rate_limit_status '
578
572
);
579
573
$ httpmethods ['POST ' ] = array (
580
574
// Tweets
@@ -664,22 +658,6 @@ private function _detectMultipart($method)
664
658
return in_array ($ method , $ multiparts );
665
659
}
666
660
667
- /**
668
- * Detects if API call should use the old endpoint
669
- *
670
- * @param string $method The API method to call
671
- *
672
- * @return bool Whether the method is defined in old API
673
- */
674
- private function _detectOld ($ method )
675
- {
676
- $ olds = array (
677
- // Users
678
- 'users/recommendations '
679
- );
680
- return in_array ($ method , $ olds );
681
- }
682
-
683
661
/**
684
662
* Detects filenames in upload parameters
685
663
*
@@ -760,8 +738,6 @@ private function _getEndpoint($method, $method_template)
760
738
{
761
739
if (substr ($ method , 0 , 5 ) == 'oauth ' ) {
762
740
$ url = self ::$ _endpoint_oauth . $ method ;
763
- } elseif ($ this ->_detectOld ($ method_template )) {
764
- $ url = self ::$ _endpoint_old . $ method . '.json ' ;
765
741
} else {
766
742
$ url = self ::$ _endpoint . $ method . '.json ' ;
767
743
}
0 commit comments