Twittex v0.3.6 Twittex.Client View Source

Twitter client to work with the Twitter API.

The client is started as part of the application and authenticates using the defined configuration.

Basically, this means that once started, your application can use function from this module directly without having to handle supervision or authentication work:

Twitter.Client.search! "#myelixirstatus"

Read the Twittex.Client.Base documentation for more details on how authentication is implemented.

Link to this section Summary

Functions

Returns the childspec that starts the client process

Returns a collection of the most recent Tweets and retweets posted by the authenticated user and the users they follow

Same as home_timeline/1 but raises HTTPoison.Error if an error occurs during the request

Returns the 20 most recent mentions (tweets containing a users’s @screen_name) for the authenticating user

Same as mentions_timeline/1 but raises HTTPoison.Error if an error occurs during the request

Returns the most recent tweets authored by the authenticated user that have been retweeted by others

Same as retweets_of_me/1 but raises HTTPoison.Error if an error occurs during the request

Returns a collection of relevant Tweets matching the given query

Same as search/2 but raises HTTPoison.Error if an error occurs during the request

Returns a stream of relevant Tweets matching the given query

Same as stream/2 but raises HTTPoison.Error if an error occurs during the request

Returns a stream of tweets authored by the authenticating user

Same as user_stream/2 but raises HTTPoison.Error if an error occurs during the request

Returns a collection of the most recent Tweets posted by the user with the given screen_name

Same as user_timeline/2 but raises HTTPoison.Error if an error occurs during the request

Link to this section Functions

Link to this function child_spec(options \\ []) View Source
child_spec(Keyword.t()) :: Supervisor.Spec.spec()

Returns the childspec that starts the client process.

Link to this function home_timeline(options \\ []) View Source
home_timeline(Keyword.t()) :: {:ok, %{}} | {:error, HTTPoison.Error.t()}

Returns a collection of the most recent Tweets and retweets posted by the authenticated user and the users they follow.

Link to this function home_timeline!(options \\ []) View Source
home_timeline!(Keyword.t()) :: %{}

Same as home_timeline/1 but raises HTTPoison.Error if an error occurs during the request.

Link to this function mentions_timeline(options \\ []) View Source
mentions_timeline(Keyword.t()) :: {:ok, %{}} | {:error, HTTPoison.Error.t()}

Returns the 20 most recent mentions (tweets containing a users’s @screen_name) for the authenticating user.

Link to this function mentions_timeline!(options \\ []) View Source
mentions_timeline!(Keyword.t()) :: %{}

Same as mentions_timeline/1 but raises HTTPoison.Error if an error occurs during the request.

Link to this function retweets_of_me(options \\ []) View Source
retweets_of_me(Keyword.t()) :: {:ok, %{}} | {:error, HTTPoison.Error.t()}

Returns the most recent tweets authored by the authenticated user that have been retweeted by others.

Link to this function retweets_of_me!(options \\ []) View Source
retweets_of_me!(Keyword.t()) :: %{}

Same as retweets_of_me/1 but raises HTTPoison.Error if an error occurs during the request.

Link to this function search(query, options \\ []) View Source
search(String.t(), Keyword.t()) :: {:ok, %{}} | {:error, HTTPoison.Error.t()}

Returns a collection of relevant Tweets matching the given query.

Link to this function search!(query, options \\ []) View Source
search!(String.t(), Keyword.t()) :: %{}

Same as search/2 but raises HTTPoison.Error if an error occurs during the request.

Link to this function stream(query \\ :sample, options \\ []) View Source
stream(String.t() | :sample | :user | :filter, Keyword.t()) ::
  {:ok, Enumerable.t()} | {:error, HTTPoison.Error.t()}

Returns a stream of relevant Tweets matching the given query.

If query is set to :sample (default), this function returns a small random sample of all public statuses (roughly 1% of all public Tweets).

Options

  • :stage - Returns the stage pid instead of the stream.
  • :min_demand - Minimum demand for this subscription.
  • :max_demand - Maximum demand for this subscription.
Link to this function stream!(query \\ :sample, options \\ []) View Source
stream!(String.t() | :sample, Keyword.t()) :: Enumerable.t()

Same as stream/2 but raises HTTPoison.Error if an error occurs during the request.

Link to this function user_stream(options \\ []) View Source
user_stream(Keyword.t()) ::
  {:ok, Enumerable.t()} | {:error, HTTPoison.Error.t()}
user_stream(Keyword.t()) :: Enumerable.t()

Returns a stream of tweets authored by the authenticating user.

Options

  • :stage - Returns the stage pid instead of the stream.
  • :min_demand - Minimum demand for this subscription.
  • :max_demand - Maximum demand for this subscription.
Link to this function user_stream!(options \\ []) View Source

Same as user_stream/2 but raises HTTPoison.Error if an error occurs during the request.

Link to this function user_timeline(screen_name, options \\ []) View Source
user_timeline(String.t(), Keyword.t()) ::
  {:ok, %{}} | {:error, HTTPoison.Error.t()}

Returns a collection of the most recent Tweets posted by the user with the given screen_name.

Link to this function user_timeline!(screen_name, options \\ []) View Source
user_timeline!(String.t(), Keyword.t()) :: %{}

Same as user_timeline/2 but raises HTTPoison.Error if an error occurs during the request.