doc(plugins/tweets): update

This commit is contained in:
lowlighter
2022-01-15 20:17:37 -05:00
parent efad2c8e30
commit cf42b76014
2 changed files with 42 additions and 40 deletions

View File

@@ -1,32 +1,29 @@
### 🐤 Tweets <!--header-->
The recent *tweets* plugin displays your latest tweets from your [Twitter](https://twitter.com) account.
<table> <table>
<td align="center"> <tr><th colspan="2"><h3>🐤 Latest tweets</h3></th></tr>
<details open><summary>Latest tweets</summary> <tr><td colspan="2" align="center"><p>This plugin displays the latest tweets from your <a href="https://twitter.com">Twitter</a> account.</p>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg"> </td></tr>
</details> <tr>
<details><summary>Latest tweets with attachments</summary> <th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg"> <td><a href="/source/templates/classic"><code>📗 Classic template</code></a> <a href="/source/templates/markdown"><code>📒 Markdown template</code></a></td>
</details> </tr>
<tr>
<td><code>👤 Users</code> <code>👥 Organizations</code></td>
</tr>
<tr>
<td><code>🗝️ plugin_tweets_token</code></td>
</tr>
<tr>
<td colspan="2" align="center">
<details open><summary>Latest tweets</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg" alt=""></img></details>
<details><summary>Latest tweets with attachments</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg" alt=""></img></details>
<img width="900" height="1" alt=""> <img width="900" height="1" alt="">
</td> </td>
</tr>
</table> </table>
<!--/header-->
<details> ## ➡️ Available options
<summary>💬 Obtaining a Twitter token</summary>
To get a Twitter token, you'll need to apply to the [developer program](https://apps.twitter.com).
It's a bit tedious, but it seems that requests are approved quite quickly.
Create an app from your [developer dashboard](https://developer.twitter.com/en/portal/dashboard) and register your bearer token in your repository secrets.
![Twitter token](/.github/readme/imgs/plugin_tweets_secrets.png)
</details>
#### ➡️ Available options
<!--options--> <!--options-->
<table> <table>
@@ -35,7 +32,7 @@ Create an app from your [developer dashboard](https://developer.twitter.com/en/p
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_tweets</code></td> <td nowrap="nowrap"><code>plugin_tweets</code></td>
<td rowspan="2"><p>Display recent tweets</p> <td rowspan="2"><p>Enable tweets plugin</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -55,7 +52,7 @@ Create an app from your [developer dashboard](https://developer.twitter.com/en/p
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_tweets_attachments</code></td> <td nowrap="nowrap"><code>plugin_tweets_attachments</code></td>
<td rowspan="2"><p>Display tweets attchments</p> <td rowspan="2"><p>Display tweets attachments (images, video previews, etc.)</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -65,7 +62,7 @@ Create an app from your [developer dashboard](https://developer.twitter.com/en/p
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_tweets_limit</code></td> <td nowrap="nowrap"><code>plugin_tweets_limit</code></td>
<td rowspan="2"><p>Maximum number of tweets to display</p> <td rowspan="2"><p>Display limit</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -89,9 +86,16 @@ Create an app from your [developer dashboard](https://developer.twitter.com/en/p
</table> </table>
<!--/options--> <!--/options-->
*[→ Full specification](metadata.yml)* ## 🗝️ Obtaining a Twitter token
#### Examples workflows To get a Twitter token, it is required to apply to the [developer program](https://apps.twitter.com).
It's a bit tedious, but requests seems to be approved quite quickly.
Create an app from the [developer dashboard](https://developer.twitter.com/en/portal/dashboard) and register your bearer token in repository secrets.
![Twitter token](/.github/readme/imgs/plugin_tweets_secrets.png)
## Examples workflows
<!--examples--> <!--examples-->
```yaml ```yaml

View File

@@ -1,5 +1,9 @@
name: "🐤 Latest tweets" name: "🐤 Latest tweets"
category: social category: social
description: This plugin displays the latest tweets from your [Twitter](https://twitter.com) account.
examples:
+latest tweets: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.svg
latest tweets with attachments: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.tweets.attachments.svg
index: 5 index: 5
supports: supports:
- user - user
@@ -7,34 +11,28 @@ supports:
scopes: [] scopes: []
inputs: inputs:
# Enable or disable plugin
plugin_tweets: plugin_tweets:
description: Display recent tweets description: Enable tweets plugin
type: boolean type: boolean
default: no default: no
# Twitter API token
# See https://apps.twitter.com for more informations
plugin_tweets_token: plugin_tweets_token:
description: Twitter API token description: Twitter API token
type: token type: token
default: "" default: ""
# Display tweets attachments (images, video previews, etc.)
plugin_tweets_attachments: plugin_tweets_attachments:
description: Display tweets attchments description: Display tweets attachments (images, video previews, etc.)
type: boolean type: boolean
default: no default: no
# Number of tweets to display
plugin_tweets_limit: plugin_tweets_limit:
description: Maximum number of tweets to display description: Display limit
type: number type: number
default: 2 default: 2
min: 1 min: 1
max: 10 max: 10
# Twitter username
plugin_tweets_user: plugin_tweets_user:
description: Twitter username description: Twitter username
type: string type: string