[TASK] Rename url api methods according to the url 67/23167/2
authorNicole Cordes <cordes@cps-it.de>
Sat, 17 Aug 2013 22:27:22 +0000 (00:27 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 17 Aug 2013 22:27:57 +0000 (00:27 +0200)
Releases: 1.0
Change-Id: I17c07dafca0d7b2884b88c609af7d4b4e3153b1d
Reviewed-on: https://review.typo3.org/23167
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Classes/Domain/Repository/TweetRepository.php
Classes/Twitter/Api.php
Classes/Twitter/Redirect.php
Classes/Twitter/SignIn.php

index 55bc2cc..8863f34 100644 (file)
@@ -114,7 +114,7 @@ class Tx_WtTwitter_Domain_Repository_TweetRepository {
                                $parameter['exclude_replies'] = 'false';
                        }
 
-                       $tweets = $this->callApi(Tx_WtTwitter_Twitter_Api::getUserTimelineUrl(), 'GET', $parameter, $response);
+                       $tweets = $this->callApi(Tx_WtTwitter_Twitter_Api::getStatusesUserTimelineUrl(), 'GET', $parameter, $response);
                }
 
                return $this->addOldUserInformation($this->sliceTweets($tweets, $count));
index 962546e..4cbef79 100644 (file)
@@ -36,21 +36,21 @@ final class Tx_WtTwitter_Twitter_Api {
        /**
         * @return string
         */
-       public static function getAccessTokenUrl() {
+       public static function getOAuthAccessTokenUrl() {
                return 'https://api.twitter.com/oauth/access_token';
        }
 
        /**
         * @return string
         */
-       public static function getAuthorizeUrl() {
+       public static function getOAuthAuthorizeUrl() {
                return 'https://api.twitter.com/oauth/authorize';
        }
 
        /**
         * @return string
         */
-       public static function getRequestTokenUrl() {
+       public static function getOAuthRequestTokenUrl() {
                return 'https://api.twitter.com/oauth/request_token';
        }
 
@@ -64,7 +64,7 @@ final class Tx_WtTwitter_Twitter_Api {
        /**
         * @return string
         */
-       public static function getUserTimelineUrl() {
+       public static function getStatusesUserTimelineUrl() {
                return 'https://api.twitter.com/1.1/statuses/user_timeline.json';
        }
 
index c605faa..ad5d5a2 100644 (file)
@@ -27,7 +27,7 @@ require_once('Api.php');
 $oAuthToken = '';
 $oAuthTokenSecret = '';
 if (!empty($_GET['oauth_token']) && !empty($_GET['oauth_verifier'])) {
-       $url = Tx_WtTwitter_Twitter_Api::getAccessTokenUrl();
+       $url = Tx_WtTwitter_Twitter_Api::getOAuthAccessTokenUrl();
 
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
index cb2702d..5b30304 100644 (file)
@@ -42,7 +42,7 @@ class Tx_WtTwitter_Twitter_SignIn {
                $extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['wt_twitter']);
                if (empty($extensionConfiguration['oauth_token']) || empty($extensionConfiguration['oauth_token_secret'])) {
                        if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse'] && function_exists('curl_init')) {
-                               $url = Tx_WtTwitter_Twitter_Api::getRequestTokenUrl();
+                               $url = Tx_WtTwitter_Twitter_Api::getOAuthRequestTokenUrl();
 
                                $ch = curl_init();
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -78,7 +78,7 @@ class Tx_WtTwitter_Twitter_SignIn {
                                        $responseArray = t3lib_div::explodeUrl2Array($response);
 
                                        $content .= '<a href="#" onclick="twitterWindow = window.open(\'' .
-                                               Tx_WtTwitter_Twitter_Api::getAuthorizeUrl() . '?oauth_token=' . $responseArray['oauth_token'] .
+                                               Tx_WtTwitter_Twitter_Api::getOAuthAuthorizeUrl() . '?oauth_token=' . $responseArray['oauth_token'] .
                                                '\',\'Sign in with Twitter\',\'height=650,width=650,status=0,menubar=0,resizable=1,location=0,directories=0,scrollbars=1,toolbar=0\');">';
                                        $content .= '<img alt="Sign in with Twitter" height="28" src="' . t3lib_extMgm::extRelPath('wt_twitter') . 'Resources/Public/Images/sign-in-with-twitter.png" width="158" />';
                                        $content .= '</a>';