Connections | R Documentation |
The tasks of the functions that the Connections
class has are to
establish the connections and control the number of requests that have been made
with the APIs of Twitter and YouTube.
The way to indicate the keys of YouTube and Twitter has to be through fields of bdpar.Options variable:
[twitter]
- bdpar.Options$set("twitter.consumer.key", <<consumer_key>>)
- bdpar.Options$set("twitter.consumer.secret", <<consumer_secret>>)
- bdpar.Options$set("twitter.access.token", <<access_token>>)
- bdpar.Options$set("twitter.access.token.secret", <<access_token_secret>>)
[youtube]
- bdpar.Options$set("youtube.app.id", <<app_id>>)
- bdpar.Options$set("youtube.app.password", <<app_password>>)
Fields of unused connections will be automatically ignored by the platform.
new()
Creates a Connections
object.
Connections$new()
getTwitterToken()
Gets the Twitter token ID.
Connections$getTwitterToken()
Value of twitterToken
.
startConnectionWithTwitter()
Responsible of establishing the connection to Twitter.
Connections$startConnectionWithTwitter()
checkRequestToTwitter()
Function in charge of handling the connection with Twitter.
Connections$checkRequestToTwitter()
startConnectionWithYoutube()
Function able to establish the connection with YouTube.
Connections$startConnectionWithYoutube()
addNumRequestToYoutube()
Function that increases in one the number of request to YouTube.
Connections$addNumRequestToYoutube()
checkRequestToYoutube()
Handles the connection with YouTube.
Connections$checkRequestToYoutube()
getNumRequestMaxToYoutube()
Gets the number of maximum requests allowed by YouTube API.
Connections$getNumRequestMaxToYoutube()
Value of number maximum of request to YouTube.
clone()
The objects of this class are cloneable with this method.
Connections$clone(deep = FALSE)
deep
Whether to make a deep clone.
bdpar.Options
, ExtractorTwtid
,
ExtractorYtbid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.