{"id":18784895,"url":"https://github.com/ghostbar/twitter-rest","last_synced_at":"2025-10-27T13:35:25.687Z","repository":{"id":11571400,"uuid":"14059457","full_name":"ghostbar/twitter-rest","owner":"ghostbar","description":"Twitter's REST API library for Node.js","archived":false,"fork":false,"pushed_at":"2014-08-04T14:30:05.000Z","size":967,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T16:15:54.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ghostbar.github.io/twitter-rest/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-02T03:03:12.000Z","updated_at":"2014-07-11T14:10:46.000Z","dependencies_parsed_at":"2022-07-13T10:10:32.339Z","dependency_job_id":null,"html_url":"https://github.com/ghostbar/twitter-rest","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Ftwitter-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Ftwitter-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Ftwitter-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Ftwitter-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostbar","download_url":"https://codeload.github.com/ghostbar/twitter-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699956,"owners_count":19682652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:44:23.690Z","updated_at":"2025-10-27T13:35:20.667Z","avatar_url":"https://github.com/ghostbar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"twitter-rest [![Code Climate](https://codeclimate.com/github/ghostbar/twitter-rest/badges/gpa.svg)](https://codeclimate.com/github/ghostbar/twitter-rest)\n============\n\nTwitter's REST library for Node.js.\n\nIncludes the core methods (API \u0026 OAuth) from [`twitter-rest-lite`](https://github.com/ghostbar/twitter-rest-lite).\n\nIncludes the convenience methods for:\n\n- Timelines\n- Tweets\n- Search\n- More to come...\n\nTimelines Interface\n-------------------\n\n### Brief\n\n    var tlib = require('twitter-rest');\n    var timeline = new tlib.timelines(variableWithCredentials);\n    // could use 'new tlib(variableWithCredentials)' too and use\n    // twitter.timelines to access this interface.\n\n    timeline.mentions(params, callback);\n    timeline.user(params, callback);\n    timeline.home(params, callback);\n    timeline.retweets(params, callback);\n\nTweets Interface\n----------------\n\n### Brief\n\n    var tlib = require('twitter-rest');\n    var tweets = new tlib.tweets(variableWithCredentials);\n    // could use 'new tlib(VariableWithCredentials)' too and use\n    // twitter.tweets to access this interface.\n\n    tweets.retweets(tweetId, params, callback); // this GETS the retweets of a tweet\n    tweets.show(tweetId, params, callback);\n    tweets.destroy(tweetId, params, callback);\n    tweets.update(params, callback);\n    tweets.retweet(tweetId, params, callback); // this MAKES a retweet to a tweet\n    tweets.oembed(params, callback);\n    tweets.retweeters(params, callback);\n\nSearch Interface\n----------------\n\n### Brief\n\n    var tlib = require('twitter-rest');\n    var search = new tlib.search(variableWithCredentials);\n    // could use 'new tlib(variablewithcredentials)' too and use\n    // twitter.search to access this interface.\n\n    search.query(params, callback);\n\n### Search.query\n\n    search.query({\n      q: 'search query goes here'\n    }, function (err, response) {\n      // do whatever you want\n    });\n\nTesting\n-------\n\nIn order to run tests, first create the file `test/config.json` with the following format:\n\n    {\n      \"consumer_key\": \"Your credential from Twitter's Developer Interface\",\n      \"consumer_secret\": \"Your credential from Twitter's Developer Interface\",\n      \"token\": \"Your credential from Twitter's Developer Interface\",\n      \"token_secret\": \"Your credential from Twitter's Developer Interface\",\n      \"callback\": \"Either your callback URL or `oob` for Desktop Apps\"\n    }\n\nNow run:\n\n    npm test\n\nKnown Issues\n------------\n\n- There's no testing for all the requests that require user context.\n\nQuick usage guide\n-----------------\n\n    var Twitter = require('twitter-rest'),\n        keys,\n        tt, ttoauth, ttapi;\n\n    keys = { consumer_key: 'blahblahblah', consumer_secret: 'blahblahblah', callback: '...' };\n\n    tt = new Twitter(keys);\n\n    // Just Twitter's OAuth REST interface\n    ttoauth = new Twitter.OAuth(keys);\n\n    keys['token'] = '...';\n    keys['token_secret'] = '...';\n\n    // Just Twitter's basic GET/POST interface\n    ttapi = new Twitter.API(keys);\n\n\nLicense and author\n------------------\n© 2013-2014, Jose Luis Rivas `\u003cme@ghostbar.co\u003e`. \n\nLicensed under the MIT terms. A copy of the license is on the file `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbar%2Ftwitter-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostbar%2Ftwitter-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbar%2Ftwitter-rest/lists"}