Description Usage Arguments Format Details Inherit Methods Private fields See Also
It is a class that inherits from the Instance
class and
implements the functions of extracting the text and the date of an twtid-type
file.
1 | ExtractorTwtid$new(path)
|
path |
(character) Path of the twtid-type file. |
An object of class R6ClassGenerator
of length 24.
The connection to twitter is handled through the Connections
class, which needs a configuration file with the necessary keys to make
requests to the twitter API.
This class stores in the folder indicates in the file configuration the tweets processed so far, this allowing you to save twitter queries. The text fields, the date and the language of the tweet are stored.
The file configuration has to have the section cache with the value of the cachePathTwtid. This variable has to be the path to store the tweets and it is neccesary that it has two folder named: "_spam_" and "_ham_"
This class inherits from Instance
and implements the
obtainSource
and obtainDate
abstracts functions.
obtainId Function that obtains the id of the twtid. Reads the id of the file indicated in the variable path.
Usage
obtainId()
getId Getter of tweet id.
Usage
getId()
Value
Value of tweet id.
obtainDate Function that obtains the date of the twtid id. Check if the tweet has previously been cached. In this case, the file is read in json format and the date is stored. Otherwise, the request is made on twitter. The date is then formatted to "%a %b %d %H:%M:%S %Z %Y" (Example: "Thu May 02 06:52:36 UTC 2013").
Usage
obtainDate()
obtainSource Function that obtains the source of the twtid id. Check if the tweet has previously been cached. In this case, the file is read in json format and the source is stored. Otherwise, the request is made on twitter.
Usage
obtainSource()
id (character) Id of tweet.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.