npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@actionsflow/trigger-twitter

v1.10.0

Published

Actionsflow trigger twitter

Downloads

330

Readme

@actionsflow/trigger-twitter

This is a twitter trigger of Actionsflow. You can watch yours or the other twitter user's updates by using this trigger.

This is an official trigger, you don't need to install it manually.

View trigger on Github

Usage

on:
  twitter:
    api: statuses/user_timeline
    auth:
      consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
      consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
      access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
      access_token_secret: ${{ secrets.TWITTER_ACCESS_SECRET }}
    params:
      screen_name: theowenyoung

Options

  • api, optional, default is statuses/user_timeline, for now, you can use search/tweets, statuses/user_timeline, statuses/mentions_timeline, favorites/list

  • auth, required, twitter API authentication, you should get it from Twitter Developers App

    auth:
      consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
      consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
      access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
      access_token_secret: ${{ secrets.TWITTER_ACCESS_SECRET }}
  • params, optional, fetch twitter API params, See search/tweets, statuses/user_timeline, statuses/mentions_timeline, favorites/list.

    For statuses/user_timeline, you must provide screen_name field, for example:

    params:
      screen_name: theowenyoung
      exclude_replies: true,
      include_rts: true,
      tweet_mode: "extended",
  • fetchAllResultsAtFirst, optional, boolean, if fetch all results at first run, the default is false, if true, it will fetch all results of tweet. This is only available when api is statuses/user_timeline

  • maxCount, optional, number, if fetchAllResultsAtFirst is true, you can use maxCount to limit the number of fetched results, such like 1000.

You can use General Config for Actionsflow Trigger for more customization.

Outputs

This trigger's outputs will be the item of the following results.

An statuses/user_timeline outputs example:

{
  "created_at": "Wed Aug 12 02:01:00 +0000 2020",
  "id": 1293366847476134000,
  "id_str": "1293366847476133888",
  "full_text": "test tweets...",
  "truncated": false,
  "display_text_range": [0, 30],
  "entities": {
    "hashtags": [],
    "symbols": [],
    "user_mentions": [],
    "urls": []
  },
  "source": "<a href=\"https://mobile.twitter.com\" rel=\"nofollow\">Twitter Web App</a>",
  "in_reply_to_status_id": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id": null,
  "in_reply_to_user_id_str": null,
  "in_reply_to_screen_name": null,
  "user": {
    "id": 1241294513575878700,
    "id_str": "1241294513575878656",
    "name": "Owen Young",
    "screen_name": "TheOwenYoung",
    "location": "",
    "description": "love workflows",
    "url": null,
    "entities": {
      "description": {
        "urls": []
      }
    },
    "protected": false,
    "followers_count": 2,
    "friends_count": 52,
    "listed_count": 1,
    "created_at": "Sat Mar 21 09:24:27 +0000 2020",
    "favourites_count": 4,
    "utc_offset": null,
    "time_zone": null,
    "geo_enabled": false,
    "verified": false,
    "statuses_count": 28,
    "lang": null,
    "contributors_enabled": false,
    "is_translator": false,
    "is_translation_enabled": false,
    "profile_background_color": "F5F8FA",
    "profile_background_image_url": null,
    "profile_background_image_url_https": null,
    "profile_background_tile": false,
    "profile_image_url": "http://pbs.twimg.com/profile_images/1241298955742273536/E26HEH2o_normal.jpg",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/1241298955742273536/E26HEH2o_normal.jpg",
    "profile_link_color": "1DA1F2",
    "profile_sidebar_border_color": "C0DEED",
    "profile_sidebar_fill_color": "DDEEF6",
    "profile_text_color": "333333",
    "profile_use_background_image": true,
    "has_extended_profile": true,
    "default_profile": true,
    "default_profile_image": false,
    "following": false,
    "follow_request_sent": false,
    "notifications": false,
    "translator_type": "none"
  },
  "geo": null,
  "coordinates": null,
  "place": null,
  "contributors": null,
  "is_quote_status": false,
  "retweet_count": 0,
  "favorite_count": 0,
  "favorited": false,
  "retweeted": false,
  "lang": "zh"
}

You can use the outputs like this:

on:
  twitter:
    api: user_timeline
    auth:
      consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
      consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
      access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
      access_token_secret: ${{ secrets.TWITTER_ACCESS_SECRET }}
    params:
      screen_name: theowenyoung
jobs:
  print:
    name: Print
    runs-on: ubuntu-latest
    steps:
      - name: Print Outputs
        env:
          text: ${{ on.twitter.outputs.full_text }}
        run: |
          echo text: $text

For the other API outputs, please see search/tweets, statuses/user_timeline, statuses/mentions_timeline, favorites/list.