OAuth client


can be created as:

Lib.OAuth.Client.new(version, consumer)

creayes OAuth client for specific version and consumer parameter

version - OAuthVersion Version object

consumer - Consumer object


created Client object has parameters:

version

OAuthVersion object

read-only

consumer

Consumer object

read-only

accessToken

one of two OAuth1AccessToken or dependio OAuth2AccessToken on version.

can be nil

refreshToken

RefreshToken object

can be nil


and methods:

getRequestToken(uri, callback, post)

return RequestToken object with uri, callback string and post true/false parameters

uri - uri string

callback - string

post - post request true/false

getAccessToken1(uri, verifier, post)

return Client object for OAuth1 with uri, vrifier strings and post true/false parameters. Obtain token from client.

uri - uri string

verifier - string

post - post request true/false

getAccessToken2(uri, code, redirectUrl, post)

return Client object for OAuth2 with uri, code, redirectUrl strings and post true/false parameters. Obtain token from client.

uri - uri string

code - string

redirectUrl - redirect url string

post - post request true/false

refreshAccessToken(uri, post)

return Client object with uri string and post true/false parameters. Obtain token from client.

uri - uri string

post - post request true/false

requestUrlEncoded(uri, post, postData)

does request first and then return result as map of values with uri string, post true/false and postData object parameters

uri - uri string

post - post request true/false

postData - data to be posted with request

requestJSON(uri, post, postData)

return JSON object after request with uri string, post true/false and postData object parameters

uri - uri string

post - post request true/false

postData - data to be posted with request

request(uri, post, postData)

return string after request with uri string, post true/false and postData object parameters

uri - uri string

post - post request true/false

postData - data to be posted with request

Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator