Skip to content

Commit

Permalink
Additional methods (getRetweeterIDs, getRetweetsOfMe,
Browse files Browse the repository at this point in the history
getFriendsNoRetweetsIDs, getFriendsList, getFollowersList,
getListOwnerships)
  • Loading branch information
coldfumonkeh committed Jan 28, 2014
1 parent 911c0f6 commit 4ba5789
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
test
.settings
settings.xml
.project
2 changes: 1 addition & 1 deletion Application.cfc
Expand Up @@ -36,7 +36,7 @@ All methods and parameters within the monkehTweet component are documented and h


<!--- Set up the application. ---> <!--- Set up the application. --->
<cfscript> <cfscript>
this.Name = "monkehTweet_V1.3.1"; this.Name = "monkehTweet_V1.4.4";
this.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 ); this.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 );
this.SessionManagement = true; this.SessionManagement = true;
this.SetClientCookies = true; this.SetClientCookies = true;
Expand Down
14 changes: 12 additions & 2 deletions com/coldfumonkeh/base.cfc
Expand Up @@ -87,6 +87,10 @@ Revision history
- revision of handleReturnFormat to return a string without messing around with serialization and back again. - revision of handleReturnFormat to return a string without messing around with serialization and back again.
Thanks to Mark Hetherington for suggesting this on Github Thanks to Mark Hetherington for suggesting this on Github
- fixing local variable error (for < CF9 ) on the entify method. - 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"> <cfcomponent displayname="base" output="false" hint="I am the base class containing util methods and common functions">
Expand All @@ -97,16 +101,17 @@ Revision history
<cfargument name="authDetails" required="true" type="any" hint="I am the authDetails class." /> <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" /> <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> <cfscript>
variables.instance.apiEndpoint = 'https://api.twitter.com/';
variables.instance.baseURL = 'http://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.searchURL = 'http://search.twitter.com/';
variables.instance.uploadURL = 'https://upload.twitter.com/1.1/'; variables.instance.uploadURL = 'https://upload.twitter.com/1.1/';
variables.instance.parseResults = arguments.parseResults; variables.instance.parseResults = arguments.parseResults;


// OAuth specific constuctors // OAuth specific constuctors
variables.instance.consumerKey = arguments.authDetails.getConsumerKey(); variables.instance.consumerKey = arguments.authDetails.getConsumerKey();
variables.instance.consumerSecret = arguments.authDetails.getConsumerSecret(); variables.instance.consumerSecret = arguments.authDetails.getConsumerSecret();

variables.instance.reqEndpoint = 'https://api.twitter.com/oauth/request_token'; variables.instance.reqEndpoint = 'https://api.twitter.com/oauth/request_token';
variables.instance.authEndpoint = 'https://api.twitter.com/oauth/authorize'; variables.instance.authEndpoint = 'https://api.twitter.com/oauth/authorize';
variables.instance.accessEndpoint = 'http://api.twitter.com/oauth/access_token'; variables.instance.accessEndpoint = 'http://api.twitter.com/oauth/access_token';
Expand All @@ -130,6 +135,10 @@ Revision history
<cfreturn variables.instance.baseURL /> <cfreturn variables.instance.baseURL />
</cffunction> </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."> <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 /> <cfreturn variables.instance.apiURL />
</cffunction> </cffunction>
Expand Down Expand Up @@ -183,6 +192,7 @@ Revision history
<cfcase value="api"><cfset strMethod = getapiURL() /></cfcase> <cfcase value="api"><cfset strMethod = getapiURL() /></cfcase>
<cfcase value="search"><cfset strMethod = getsearchURL() /></cfcase> <cfcase value="search"><cfset strMethod = getsearchURL() /></cfcase>
<cfcase value="upload"><cfset strMethod = getuploadURL() /></cfcase> <cfcase value="upload"><cfset strMethod = getuploadURL() /></cfcase>
<cfcase value="no_version"><cfset strMethod = getapiEndpoint() /></cfcase>
</cfswitch> </cfswitch>
<cfreturn strMethod /> <cfreturn strMethod />
</cffunction> </cffunction>
Expand Down

0 comments on commit 4ba5789

Please sign in to comment.