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 ytbid-type
file.
1 | ExtractorTwtid$new(path)
|
path |
(character) Path of the ytbid-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 youtube API.
This class stores in the folder indicates in the file configuration the comments processed so far, thus allowing you to save youtuve queries. The text fields and the date of the comment are stored.
The file configuration has to have the section cache with the value of the cachePathYtbid. 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 ytbid. Read the id of the file indicated in the variable path.
Usage
obtainId()
getId Getter of comment id.
Usage
getId()
Value
Value of comment id.
obtainDate Function that obtains the date of the ytbid id. Check if the comment 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 youtube The date is then formatted to the established standard.
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 comment.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.