twitterVerbDocs

Twitter verbs
  twitter.getUserProfile
    Syntax
      twitter.getUserProfile (string)
    Param
      string is the screenname of the user whose profile you want to get.
    Returns
      An object containing information about the user whose screenname is provided.
    Errors
      The string is not the screenname of an actual Twitter user.
    Example
      twitter.getUserProfile ("bullmancuso").id
        15252142
      twitter.getUserProfile ("bullmancuso").description
        This aggression will not stand
      twitter.getUserProfile ("bullmancuso").location
        None a you business
  twitter.getTweet
    Syntax
      twitter.getTweet (id)
    Param
      id is a string which is the Twitter-issued identifier for the tweet.
    Action
      Gets all the information about the tweet in a JavaScript object.
    Returns
      An object containing a lot of information about the tweet and its author.
    Errors
      It's an error if the id is not a valid Twitter-issued identifier.
    Notes
      This call does not appear to require authentication.
    Example
      twitter.getTweet ("1369636870334906368").full_text
        Links don’t work in twitter. Most people don’t click them, too much of a wait, obnoxious ads and subscription pitches, paywalls, article limits. It’s a mess! Meanwhile bloggers with no ads, none of the junk, are caught up in the morass. This has been festering for too long.
      twitter.getTweet ("1369636870334906368").created_at
        Wed Mar 10 13:10:51 +0000 2021
      jsonStringify (twitter.getTweet ("1369636870334906368"))
        { "created_at": "Wed Mar 10 13:10:51 +0000 2021", "id": 1369636870334906400, "id_str": "1369636870334906368", "full_text": "Links don’t work in twitter. Most people don’t click them, too much of a wait, obnoxious ads and subscription pitches, paywalls, article limits. It’s a mess! Meanwhile bloggers with no ads, none of the junk, are caught up in the morass. This has been festering for too long.", "truncated": false, "display_text_range": [ 0, 274 ], "entities": { "hashtags": [], "symbols": [], "user_mentions": [], "urls": [] }, "source": "Twitter Web App", "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": 3839, "id_str": "3839", "name": "dave@scripting.com", "screen_name": "davewiner", "location": "Woodstock, NY", "description": "On the net since mid-70s. Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS. Open web.", "url": "https://t.co/ztgzDGiyOj", "entities": { "url": { "urls": [ { "url": "https://t.co/ztgzDGiyOj", "expanded_url": "http://scripting.com/", "display_url": "scripting.com", "indices": [ 0, 23 ] } ] }, "description": { "urls": [] } }, "protected": false, "followers_count": 67269, "friends_count": 3844, "listed_count": 5293, "created_at": "Sat Aug 05 23:04:08 +0000 2006", "favourites_count": 17360, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 190327, "lang": null, "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "9AE4E8", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": true, "profile_image_url": "http://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_banner_url": "https://pbs.twimg.com/profile_banners/3839/1615741101", "profile_link_color": "7F7F90", "profile_sidebar_border_color": "FFFFFF", "profile_sidebar_fill_color": "E1E1DF", "profile_text_color": "000000", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": false, "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": 4, "favorite_count": 11, "favorited": false, "retweeted": true, "lang": "en" }
  twitter.getThread
    Syntax
      twitter.getThread (id)
    Param
      id is a string which is the Twitter-issued identifier for the top tweet in the thread.
    Returns
      An object containing an object with info about the author, and an array with the tweets in the thread.
    Errors
      It's an error if the id is not a valid Twitter-issued identifier.
    Example
      jsonStringify (twitter.getThread ("1371210116473761792").tweets [0])
        { "text": "What is ThreadViewer? \n\nIt's a way to view Twitter threads outside of Twitter.", "id": "1371210116473761792", "when": "Sun, 14 Mar 2021 21:22:22 GMT", "parent": null }
      jsonStringify (twitter.getThread ("1371210116473761792").author)
        { "name": "dave@scripting.com", "description": "On the net since mid-70s. Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS. Open web.", "screenname": "davewiner", "when": "Sun, 14 Mar 2021 21:22:22 GMT", "url": "http://scripting.com/", "id": "1371210116473761792" }
  twitter.newPost
    Syntax
      twitter.newPost (string, id)
    Params
      The string is the body of the tweet to be sent. It is limited to 280 characters.
      Optional: id is the id of the tweet that it's in reply to, if it is a reply. If it is not a reply leave it undefined or 0.
    Returns
      An object with all the info Twitter has about the new tweet. There's a lot of data there. ;-)
    Errors
      It's an error if the body is longer than 280 characters, or if the id is of a tweet that doesn't exist.
    Example
      twitter.newPost ("I'm having fun writing example code on a Saturday night!").id_str
        1373410165907668994
      twitter.newPost ("A reply to the previous tweet?", "1373410165907668994").id_str
        1373410446536028161
      jsonStringify (twitter.newPost (string.randomSnarkySlogan ()))
        { "created_at": "Sat Mar 20 23:03:22 +0000 2021", "id": 1373409861212442600, "id_str": "1373409861212442626", "text": "This is unfortunate and we're stuck with it forever.", "truncated": false, "entities": { "hashtags": [], "symbols": [], "user_mentions": [], "urls": [] }, "source": "Little Outliner", "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": 3839, "id_str": "3839", "name": "dave@scripting.com", "screen_name": "davewiner", "location": "Woodstock, NY", "description": "On the net since mid-70s. Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS. Open web.", "url": "https://t.co/ztgzDGiyOj", "entities": { "url": { "urls": [ { "url": "https://t.co/ztgzDGiyOj", "expanded_url": "http://scripting.com/", "display_url": "scripting.com", "indices": [ 0, 23 ] } ] }, "description": { "urls": [] } }, "protected": false, "followers_count": 67269, "friends_count": 3845, "listed_count": 5293, "created_at": "Sat Aug 05 23:04:08 +0000 2006", "favourites_count": 17360, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 190329, "lang": null, "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "9AE4E8", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": true, "profile_image_url": "http://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_banner_url": "https://pbs.twimg.com/profile_banners/3839/1616275541", "profile_link_color": "7F7F90", "profile_sidebar_border_color": "FFFFFF", "profile_sidebar_fill_color": "E1E1DF", "profile_text_color": "000000", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": false, "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": "en" }
  twitter.getHomeTimeline
    Syntax
      twitter.getHomeTimeline ()
    Params
      None.
    Returns
      An array object with the most recent tweets in the user's home timeline.
      The home timeline is the list of tweets that appear on the Home page in the Twitter website.
    Notes
      In the example, we get a value out of the timeline, displaying the whole array of tweets would take a lot of space.
      It will return at most 200 tweets.
    Example
      twitter.getHomeTimeline ().length
        196
      twitter.getHomeTimeline () [0].id
        1373683899830841300
  twitter.getMentionsTimeline
    Syntax
      twitter.getMentionsTimeline ()
    Params
      None.
    Returns
      An array with the most recent tweets that mention the logged-in user.
    Notes
      It will return at most 200 tweets.
    Example
      twitter.getMentionsTimeline ().length
        107
      twitter.getMentionsTimeline () [0].full_text
        @davewiner Too much focus on wall street and war. I was watching this talk just before reading your tweet, this guy gets it, a great speaker too. https://t.co/Nb3LhdIFpM
  twitter.getUserTimeline
    Syntax
      twitter.getUserTimeline (string, boolean)
    Params
      The string is a screenname for a Twitter user, such as "jack" or "bullmancuso".
      The boolean determines if you want to include replies in the timeline. It's optional, if not specified it defaults to false.
    Returns
      An array with the most recent tweets from the indicated user.
    Notes
      It will return at most 200 tweets.
    Example
      twitter.getUserTimeline ("jack").length
        200
      twitter.getUserTimeline ("davewiner", false) [18].full_text
        This is unfortunate and we're stuck with it forever.