Permalink
Browse files

Additional methods (getRetweeterIDs, getRetweetsOfMe,

getFriendsNoRetweetsIDs, getFriendsList, getFollowersList,
getListOwnerships)
  • Loading branch information...
1 parent 911c0f6 commit 4ba57892c6d8b424c9b53700688e6fb1b66625d1 @coldfumonkeh committed Jan 28, 2014
Showing with 109 additions and 10 deletions.
  1. +4 −0 .gitignore
  2. +1 −1 Application.cfc
  3. +12 −2 com/coldfumonkeh/base.cfc
  4. +92 −7 com/coldfumonkeh/monkehTweet.cfc
View
@@ -0,0 +1,4 @@
+test
+.settings
+settings.xml
+.project
View
@@ -36,7 +36,7 @@ All methods and parameters within the monkehTweet component are documented and h
<!--- Set up the application. --->
<cfscript>
- this.Name = "monkehTweet_V1.3.1";
+ this.Name = "monkehTweet_V1.4.4";
this.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 );
this.SessionManagement = true;
this.SetClientCookies = true;
@@ -87,6 +87,10 @@ Revision history
- revision of handleReturnFormat to return a string without messing around with serialization and back again.
Thanks to Mark Hetherington for suggesting this on Github
- fixing local variable error (for < CF9 ) on the entify method.
+
+27/01/2014 - Version 1.4.4
+
+ - added api endpoint value (without the version number) and additional getter to retrieve it within the main component using the no_version filter.
--->
<cfcomponent displayname="base" output="false" hint="I am the base class containing util methods and common functions">
@@ -97,16 +101,17 @@ Revision history
<cfargument name="authDetails" required="true" type="any" hint="I am the authDetails class." />
<cfargument name="parseResults" required="false" type="boolean" default="false" hint="A boolean value to determine if the output data is parsed or returned as a string" />
<cfscript>
+ variables.instance.apiEndpoint = 'https://api.twitter.com/';
variables.instance.baseURL = 'http://twitter.com/';
- variables.instance.apiURL = 'https://api.twitter.com/1.1/';
+ variables.instance.apiURL = variables.instance.apiEndpoint & '1.1/';
variables.instance.searchURL = 'http://search.twitter.com/';
variables.instance.uploadURL = 'https://upload.twitter.com/1.1/';
variables.instance.parseResults = arguments.parseResults;
// OAuth specific constuctors
variables.instance.consumerKey = arguments.authDetails.getConsumerKey();
variables.instance.consumerSecret = arguments.authDetails.getConsumerSecret();
-
+
variables.instance.reqEndpoint = 'https://api.twitter.com/oauth/request_token';
variables.instance.authEndpoint = 'https://api.twitter.com/oauth/authorize';
variables.instance.accessEndpoint = 'http://api.twitter.com/oauth/access_token';
@@ -130,6 +135,10 @@ Revision history
<cfreturn variables.instance.baseURL />
</cffunction>
+ <cffunction name="getapiEndpoint" access="public" output="false" returntype="string" hint="I return the api endpoint for use in the OAuth method calls.">
+ <cfreturn variables.instance.apiEndpoint />
+ </cffunction>
+
<cffunction name="getapiURL" access="public" output="false" returntype="string" hint="I return the api url for use in the method calls.">
<cfreturn variables.instance.apiURL />
</cffunction>
@@ -183,6 +192,7 @@ Revision history
<cfcase value="api"><cfset strMethod = getapiURL() /></cfcase>
<cfcase value="search"><cfset strMethod = getsearchURL() /></cfcase>
<cfcase value="upload"><cfset strMethod = getuploadURL() /></cfcase>
+ <cfcase value="no_version"><cfset strMethod = getapiEndpoint() /></cfcase>
</cfswitch>
<cfreturn strMethod />
</cffunction>
Oops, something went wrong.

0 comments on commit 4ba5789

Please sign in to comment.