{"id":17965031,"url":"https://github.com/tgrk/yatael","last_synced_at":"2025-07-07T16:33:11.505Z","repository":{"id":9864557,"uuid":"11862669","full_name":"tgrk/yatael","owner":"tgrk","description":"Yet Another Twitter API Erlang Library","archived":false,"fork":false,"pushed_at":"2020-01-26T12:16:05.000Z","size":76,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T09:40:48.348Z","etag":null,"topics":["erlang","erlang-library","oauth","twitter-api"],"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/tgrk.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-08-03T12:14:51.000Z","updated_at":"2021-10-03T05:42:50.000Z","dependencies_parsed_at":"2022-09-09T23:12:38.383Z","dependency_job_id":null,"html_url":"https://github.com/tgrk/yatael","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrk%2Fyatael","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrk%2Fyatael/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrk%2Fyatael/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrk%2Fyatael/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgrk","download_url":"https://codeload.github.com/tgrk/yatael/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245413672,"owners_count":20611351,"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":["erlang","erlang-library","oauth","twitter-api"],"created_at":"2024-10-29T12:09:53.398Z","updated_at":"2025-03-25T06:31:08.685Z","avatar_url":"https://github.com/tgrk.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/tgrk/yatael/tree/master.svg?style=svg)](https://circleci.com/gh/tgrk/yatael/tree/master)\n[![codecov.io](https://codecov.io/github/tgrk/yatael/coverage.svg?branch=master)](https://codecov.io/github/tgrk/yatael?branch=master)\n\nyatael\n======\n\nYet Another [Twitter REST API][1] (v1.1) Erlang Library\n\nImplemented REST API Calls\n===\n* `request_token/2`\n* `get_authorize_url/1`\n* `get_access_token/3`\n* `authorize/2`\n* `unauthorize/1`\n* `verify_credentials/2`\n* `get_timeline/1`\n* `get_timeline/2`\n* `get_mentions_timeline/2`\n* `lookup_status/2`\n* `search/2`\n\nBesides REST API and Search API there is of coure support for OAuth and few related helper functions for easy signup integration.\n\n## Dependencies\n* Erlang (\u003e= R17)\n* [jiffy][2]\n\nFetch and compile all dependencies:\n```\n$ rebar3 update compile\n```\nor\n```bash\n$ rebar get-deps compile\n```\n\nOAuth\n===\nhttps://dev.twitter.com/oauth\n\nAPI Rate Limits\n===\nhttps://dev.twitter.com/rest/public/rate-limits\nhttps://dev.twitter.com/rest/public/rate-limiting\n\nRegister your application\n===\n\n1. Sign in at https://apps.twitter.com\n2. Click on Create New App\n3. Enter your Application Name, Description and Website\n4. For Callback URL: `http://127.0.0.1:3000`\n5. Go to Settings tab\n6. Under Application Type select Read and Write access\n7. Check the box Allow this application to be used to Sign in with Twitter\n8. Click Update this Twitter's applications settings\n9. Obtain Consumer Key (API Key or ClientId) and Consumer Secret (API Secret)\n\n\nRaw library usage\n===\n```erlang\n1\u003e ConsumerKey = \u003c\u003c\"foo\"\u003e\u003e,\n2\u003e ConsumerSecret = \u003c\u003c\"bar\"\u003e\u003e,\n3\u003e CallbackUri = \u003c\u003c\"http://127.0.0.1/\"\u003e\u003e.\n4\u003e {ok, _Apps} = application:ensure_all_started(yatael).\n5\u003e {ok, Pid} = yatael:start_link(ConsumerKey, ConsumerSecret).\n6\u003e ok = yatael:request_token(Pid, CallbackUri).\n7\u003e {ok, Url} = yatael:get_authorize_url(Pid).\n```\nOpen `Url` value in brower and accept Twitter oAuth and extract following arguments\nafter sucessfull redirect to your `CallbackUri`:\n```erlang\n8\u003e AccessToken = \u003c\u003c\"foo2\"\u003e\u003e.\n9\u003e Verifier = \u003c\u003c\"bar2\"\u003e\u003e.\n10\u003e ok = yatael:get_access_token(Pid, AccessToken, Verifier),\n```\nNow athentification is done and you can use supproted API calls:\n```erlang\n11\u003e yatael:verify_credentials(Pid, [{skip_status, true}]).\n{ok,#{\u003c\u003c\"contributors_enabled\"\u003e\u003e =\u003e false,\n      \u003c\u003c\"created_at\"\u003e\u003e =\u003e \u003c\u003c\"Fri Jun 26 09:22:24 +0000 2009\"\u003e\u003e,\n      \u003c\u003c\"default_profile\"\u003e\u003e =\u003e false,\n      \u003c\u003c\"default_profile_image\"\u003e\u003e =\u003e false,\n      ....\n12\u003e yatael:get_timeline(Pid).\n      ....\n13\u003e yatael_auth:unauthorize(Pid).\nok\n```\n\nAuth helper usage\n===\n```erlang\n1\u003e ConsumerKey = \u003c\u003c\"foo\"\u003e\u003e,\n2\u003e ConsumerSecret = \u003c\u003c\"bar\"\u003e\u003e,\n3\u003e CallbackUri = \u003c\u003c\"http://127.0.0.1/\"\u003e\u003e.\n4\u003e {ok, _Apps} = application:ensure_all_started(yatael).\n5\u003e {ok, Pid} = yatael:start_link(ConsumerKey, ConsumerSecret).\n6\u003e ok = yatael:request_token(Pid, CallbackUri).\n7\u003e {ok, Url} = yatael:get_authorize_url(Pid).\n...\n8\u003e Map = #{\u003c\u003c\"oauth_token\"\u003e\u003e =\u003e \u003c\u003c\"foo3\"\u003e\u003e, \u003c\u003c\"oauth_verifier\"\u003e\u003e =\u003e \u003c\u003c\"bar3\"\u003e\u003e, \u003c\u003c\"callback_uri\"\u003e\u003e =\u003e CallbackUri}.\n9\u003e yatael_auth:authorize(Pid, Map).\n{ok,#{\u003c\u003c\"contributors_enabled\"\u003e\u003e =\u003e false,\n      \u003c\u003c\"created_at\"\u003e\u003e =\u003e \u003c\u003c\"Fri Jun 26 09:22:24 +0000 2009\"\u003e\u003e,\n      \u003c\u003c\"default_profile\"\u003e\u003e =\u003e false,\n      \u003c\u003c\"default_profile_image\"\u003e\u003e =\u003e false,\n      ....\n10\u003e yatael_auth:unauthorize(Pid).\nok\n\n```\n\n\n[1]: https://dev.twitter.com/rest/public\n[2]: https://github.com/davisp/jiffy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrk%2Fyatael","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgrk%2Fyatael","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrk%2Fyatael/lists"}