Permalink
Browse files

Simplified API Version 1.1 Support

  • Loading branch information...
1 parent 0eac35c commit c3e33577f8382b459b9d3d1b639d8a35805660a1 @aaronwaldon aaronwaldon committed Feb 19, 2013
Showing with 2 additions and 6 deletions.
  1. +2 −6 EpiTwitter.php
View
@@ -18,8 +18,7 @@ class EpiTwitter extends EpiOAuth
protected $accessTokenUrl = 'https://api.twitter.com/oauth/access_token';
protected $authorizeUrl = 'https://api.twitter.com/oauth/authorize';
protected $authenticateUrl= 'https://api.twitter.com/oauth/authenticate';
- protected $apiUrl = 'https://api.twitter.com/1.1';
- protected $apiVersionedUrl= 'https://api.twitter.com';
+ protected $apiUrl = 'https://api.twitter.com';
protected $userAgent = 'EpiTwitter (http://github.com/jmathai/twitter-async/tree/)';
protected $apiVersion = '1.1';
protected $isAsynchronous = false;
@@ -102,10 +101,7 @@ public function __call($name, $params = null/*, $username, $password*/)
private function getApiUrl($endpoint)
{
- if (! empty($this->apiVersion))
- return "{$this->apiVersionedUrl}/{$this->apiVersion}{$endpoint}";
- else
- return "{$this->apiUrl}{$endpoint}";
+ return "{$this->apiUrl}/{$this->apiVersion}{$endpoint}";
}
private function request($method, $endpoint, $params = null)

0 comments on commit c3e3357

Please sign in to comment.