{"id":13896682,"url":"https://github.com/wolfiestyle/LuaTwit","last_synced_at":"2025-07-17T13:30:47.635Z","repository":{"id":138668203,"uuid":"12338431","full_name":"wolfiestyle/LuaTwit","owner":"wolfiestyle","description":"Lua library for accessing the Twitter REST and Streaming API v1.1","archived":false,"fork":false,"pushed_at":"2017-11-02T21:15:06.000Z","size":627,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-25T02:33:16.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","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/wolfiestyle.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2013-08-24T04:58:53.000Z","updated_at":"2023-02-26T14:07:46.000Z","dependencies_parsed_at":"2024-02-23T11:25:18.291Z","dependency_job_id":null,"html_url":"https://github.com/wolfiestyle/LuaTwit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/wolfiestyle/LuaTwit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfiestyle%2FLuaTwit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfiestyle%2FLuaTwit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfiestyle%2FLuaTwit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfiestyle%2FLuaTwit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfiestyle","download_url":"https://codeload.github.com/wolfiestyle/LuaTwit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfiestyle%2FLuaTwit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265611081,"owners_count":23797809,"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-08-06T18:03:05.057Z","updated_at":"2025-07-17T13:30:47.359Z","avatar_url":"https://github.com/wolfiestyle.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# LuaTwit\n\nLua library for accessing the Twitter REST and Streaming API v1.1.\nIt implements simple parameter checking and returns metatable-typed JSON data.\n\n## Dependencies\n\n- dkjson\n- lua-curl\n- oauth_light\n\nAlso you'll need `ldoc` if you want to build the docs and `penlight` to run the examples.\n\n## Documentation\n\nAvailable online [here](http://darkstalker.github.io/LuaTwit/master).\n\n## Installation\n\nUsing LuaRocks:\n\n    luarocks install luatwit\n\n## Usage\n\nFirst, you need a set of app keys. You can get them from [here](https://apps.twitter.com/).\n\n    local luatwit = require \"luatwit\"\n\n    -- Fill in your app keys here\n    local keys = {\n        consumer_key = \"\u003ckey\u003e\",\n        consumer_secret = \"\u003csecret\u003e\",\n        oauth_token = \"\u003ctoken\u003e\",\n        oauth_token_secret= \"\u003ctoken_secret\u003e\",\n    }\n\nThe twitter client is created by the method `luatwit.api.new`:\n\n    local client = luatwit.api.new(keys)\n\nUse this object to do API calls. The argument names are checked against the definitions in `luatwit.resources`:\n\n    local result = client:get_home_timeline{ count = 1 }\n\nThe JSON data is returned in a table:\n\n    print(result[1].user.screen_name, result[1].text)\n\nThe returned data has a metatable (from `luatwit.objects`) that describes the object type:\n\n    print(result._type)         -- \"tweet_list\"\n    print(result[1]._type)      -- \"tweet\"\n    print(result[1].user._type) -- \"user\"\n\nThe type metatables also provide convenience methods:\n\n    result[1]:set_favorite():retweet()\n    result[1]:reply{ status = \"answer!\", _mention = true }\n\nThe methods can be called in async mode, and they'll return a future object that can be read with `:peek()` and `:wait()`:\n\n    local res_f = client:get_user{ user_id = 783214, _async = true }\n    print(res_f._type)          -- \"future\"\n    print(res_f:wait().screen_name)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfiestyle%2FLuaTwit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfiestyle%2FLuaTwit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfiestyle%2FLuaTwit/lists"}