Twitter¶
pip install kpireport-twitter
API¶
- class kpireport_twitter.TwitterDatasource(report: Report, **kwargs)¶
Bases:
Datasource
A datasource that can fetch metrics from Twitter’s V2 API.
Currently the following queries are supported:
tweets
: request a list of the user’s latest Tweets via the Timeline API. If requesting the authenticated user’s own timeline, “non-public” metrics such as impression counts are included in the output table result. Otherwise, only public metrics such as like, reply, and retweet counts are retrieved. The text and ID of the Tweet are also included in the output table.
- consumer_key¶
The Twitter application consumer public key.
- Type
str
- consumer_secret¶
The Twitter application consumer secret.
- Type
str
- access_token_key¶
The user-scoped access token public key.
- Type
str
- access_token_secret¶
The user-scoped access token secret.
- Type
str
- pagination_delay_s¶
The number of seconds to wait before fetching the next page of results from Twitter’s API. It is recommended to set this to at least 1 to avoid rate limits or downstream errors from the API. (Default 5)
- Type
int
- class kpireport_twitter.TwitterEngagement(report: Report, datasources: DatasourceManager, **kwargs)¶
Bases:
Plot
Display a summary of engagement with an account’s own Tweets.
- \*\*kwargs
keyword arguments passed to the parent
Plot
plugin.
Changelog¶
0.1.1¶
Bug Fixes¶
Tweets are now displayed in the timezone configured in the report.
Always use OAuth2 when authenticating, even when using consumer key/secret application-only authentication. OAuth1.0 will throw an error from the TwitterAPI module.
0.1.0¶
New Features¶
A new View
twitter.engagement
is available. The view will show a scatter plot of recent tweets, displaying their like/reply/retweet counts. The highest- liked tweet is called out visually as well.
0.0.1¶
Prelude¶
Initial commit.
New Features¶
A new
twitter
Datasource is available from this plugin, which allows you to query for Tweets of a given user.