Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radzserg/rstwitter
Elixir Twitter Client
https://github.com/radzserg/rstwitter
Last synced: 4 days ago
JSON representation
Elixir Twitter Client
- Host: GitHub
- URL: https://github.com/radzserg/rstwitter
- Owner: radzserg
- License: mit
- Created: 2018-08-15T11:33:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T09:57:58.000Z (over 5 years ago)
- Last Synced: 2024-10-10T20:54:04.341Z (25 days ago)
- Language: Elixir
- Homepage: https://hexdocs.pm/rs_twitter
- Size: 23.4 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Low Level Twitter Client for Elixir. (Third Party APIs)
- fucking-awesome-elixir - rs_twitter - Low Level Twitter Client for Elixir. (Third Party APIs)
- awesome-elixir - rs_twitter - Low Level Twitter Client for Elixir. (Third Party APIs)
README
# RsTwitter
**Twitter Client for Elixir**
This is low level twitter client. The idea behind this package is not to define special functions for each endpoint,
but use generic request structure`%RsTwitter.Request{endpoint: "followers/ids", parameters: %{"user_id" => 123}, credentials: credentials}`
Such request structure can do API request to any twitter API endpoint.
Just browse [API Docs](https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference)
and create appropriate `%RsTwitter.Request{}````elixir
%RsTwitter.Request{endpoint: "followers/ids", parameters: %{"user_id" => 123}, credentials: credentials}
%RsTwitter.Request{endpoint: "users/lookup", parameters: %{"screen_name" => "radzserg"}, credentials: credentials}
%RsTwitter.Request{method: :post, endpoint: "friendships/create", parameters: %{"screen_name" => "radzserg"}, credentials: credentials}
# discover docs to build your request
```You will get raw response object and it's your responsibility how to use it.
```elixir
{:ok,
%RsTwitter.Response{
body: %{
"ids" => [1029248792367964162, 991927650775117824, 918173404812972032,
435437746, ...],
"next_cursor" => 1593371931590276485,
"next_cursor_str" => "1593371931590276485",
"previous_cursor" => 0,
"previous_cursor_str" => "0"
},
headers: [
{"x-rate-limit-limit", "15"},
...
],
status_code: 200
}}```
## Installation
Add `rs_twitter` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:rs_twitter, "~> 0.1.0"}
]
end
```**Documentation**
[Browse documentation](https://hexdocs.pm/rs_twitter/)