Pocketeer v0.1.4 Pocketeer.Client

A simple Client struct to hold consumer key and access token for easier use with this library.

Summary

Functions

Builds a Client struct with consumer_key and access_token

Types

t :: %Pocketeer.Client{access_token: String.t, consumer_key: String.t, site: String.t}

Functions

new(options)

Specs

new(map) :: t

Builds a Client struct with consumer_key and access_token.

Parameters

  • options: a map with consumer_key, access_token and site (optional)

Examples

iex> Pocketeer.Client.new(%{consumer_key: "1234", access_token: "abcd"})
%Pocketeer.Client{access_token: "abcd", consumer_key: "1234", site: "https://getpocket.com"}
new(consumer_key, access_token)

Specs

new(String.t, String.t) :: t

Builds a Client.

Parameters

  • consumer_key: The consumer key received from the Pocket application page
  • access_token: The access token retrieved after successful authorization with Pocket

Examples

iex> Pocketeer.Client.new("1234", "abcd")
%Pocketeer.Client{access_token: "abcd", consumer_key: "1234", site: "https://getpocket.com"}