{"id":16389673,"url":"https://github.com/yuce/twitter_kit","last_synced_at":"2025-07-26T05:13:37.589Z","repository":{"id":23331901,"uuid":"26692210","full_name":"yuce/twitter_kit","owner":"yuce","description":"Erlang Twitter Kit","archived":false,"fork":false,"pushed_at":"2015-10-16T17:16:22.000Z","size":461,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T13:46:51.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/yuce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-15T20:05:49.000Z","updated_at":"2015-11-16T10:13:24.000Z","dependencies_parsed_at":"2022-08-21T16:00:41.589Z","dependency_job_id":null,"html_url":"https://github.com/yuce/twitter_kit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuce%2Ftwitter_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuce%2Ftwitter_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuce%2Ftwitter_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuce%2Ftwitter_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuce","download_url":"https://codeload.github.com/yuce/twitter_kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240216495,"owners_count":19766593,"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-10-11T04:33:57.965Z","updated_at":"2025-02-22T18:25:12.291Z","avatar_url":"https://github.com/yuce.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Kit\n\n## Introduction\n\nTwitter Kit is an Erlang library for Twitter REST API.\n\nTwitter Kit tries to do as little as it can while abstracting away the boring parts of Twitter API, like authentication and cursors/timelines.\n\nThe library is composed of three parts:\n\n1. Authentication functions in `twitter_auth` module,\n2. Generic `GET` and `POST` request functions in `twitter_rest` module,\n3. Easy and concise API in the `twitter` module.\n\nYou won't need to use `twitter_rest` module unless you need something which is not implemented in `twitter` module.\n\n\n### Features:\n\n - OAuth authentication,\n - Application (_Bearer_) authentication,\n - Twitter REST API,\n - Cursor and timelines,\n - Media upload,\n - Comprehensive documentation, examples and tests.\n\n### Todo:\n\n - Easy API for the following REST endpoints: direct_messages, account, blocks, users, mutes, favorites, lists, saved_searches, geo, trends, application, help\n - Streaming API\n - More tests\n - Test on non-recent Erlang versions and Linux\n\n## Install\n\nTwitter Kit uses [Rebar](https://github.com/rebar/rebar) as its build tool. You just need to add it to your `rebar.config` as a dependency:\n\n    {deps, [{twitter_kit, \"1.*\", {git, \"https://github.com/yuce/twitter_kit.git\", \"master\"}}]}.\n\nTwitter Kit uses [jsx](https://github.com/talentdeficit/jsx) to decode JSON responses. You don't need to add it to your config.\n\n\n## Usage\n\nHere's a simple example which shows how to traverse user timelines:\n\n    % ConsumerKey and ConsumerSecret are defined somewhere.\n    % AccessToken and AccessTokenSecret are defined somewhere.\n    % They come from the \"Keys and Access Tokens\" tab of your\n    % Twitter \"Application Management\" page, linked from\n    % https://apps.twitter.com\n    Auth = twitter_auth:new({consumer, ConsumerKey, ConsumerSecret},\n                            {token, AccessToken, AccessTokenSecret}),\n    Api = twitter:new(Auth),\n    {ok, {Pointer, Tweets}} = twitter:get(Api, {statuses, user_timeline},\n                            [{screen_name, \"twitter\"},\n                             {count, 10}]).\n    % Do something with the tweets\n    % Fetch earlier tweets\n    {ok, {Pointer2, EarlierTweets}} = twitter:prev(Pointer).\n\nAnd another one which shows how to post a tweet with an attached photo:\n\n    % ConsumerKey and ConsumerSecret are defined somewhere.\n    % AccessToken and AccessTokenSecret are defined somewhere.\n    % They come from the \"Keys and Access Tokens\" tab of your\n    % Twitter \"Application Management\" page, linked from\n    % https://apps.twitter.com\n    Auth = twitter_auth:new({consumer, ConsumerKey, ConsumerSecret},\n                            {token, AccessToken, AccessTokenSecret}),\n    Api = twitter:new(Auth),\n    % MediaBinary is the image data, loaded from somewhere, e.g., file system\n    {ok, Data} = twitter:post(Api, {media, upload}, {media, \"Sample Photo\", MediaBinary}),\n    {_, MediaId} = lists:keyfind(\u003c\u003c\"media_id\"\u003e\u003e, 1, Data),\n    % Post the tweet\n    Text = \"This is my funny tweet\",\n    MediaIdStr = integer_to_list(MediaId),\n    {ok, Tweet} = twitter:post(Api, {statuses, update}, [{status, Text}, {media_ids, MediaIdStr}]).\n\nSee the [docs](doc/) for more documentation.\n\n## Examples and tests\n\nThere are some [example scripts](examples/) which show how some common tasks are done.\n\nSee: [README for tests](test/README.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuce%2Ftwitter_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuce%2Ftwitter_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuce%2Ftwitter_kit/lists"}