Pixela API client for Elixir
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
config
lib
test
.gitignore
LICENSE
README.md
mix.exs
mix.lock

README.md

CircleCI

pixela_ex

Pixela API client for Elixir

Installation

pixela_ex can be installed by adding pixela_ex to your list of dependencies in mix.exs:

def deps do
  [{:pixela_ex, git: "https://github.com/otoyo/pixela_ex", tag: "1.0.0"}]
end

Usage

Some basic examples:

iex> PixelaEx.create_user("a-know", "thisissecret", true, true)
{:ok, %HTTPotion.Response{body: %{"isSuccess" => true, "message" => "Success."},
 headers: %HTTPotion.Headers{hdrs: %{...}},
 status_code: 200}}

iex> PixelaEx.create_graph("a-know", "thisissecret", "test-graph", "graph-name", "commit", "int", "shibafu")
{:ok, %HTTPotion.Response{body: %{"isSuccess" => true, "message" => "Success."},
 headers: %HTTPotion.Headers{hdrs: %{...}},
 status_code: 200}}

iex> PixelaEx.create_pixel("a-know", "thisissecret", "test-graph", "20181020", "5")
{:ok, %HTTPotion.Response{body: %{"isSuccess" => true, "message" => "Success."},
 headers: %HTTPotion.Headers{hdrs: %{...}},
 status_code: 200}}

iex> PixelaEx.increment_pixel("a-know", "thisissecret", "test-graph")
{:ok, %HTTPotion.Response{body: %{"isSuccess" => true, "message" => "Success."},
 headers: %HTTPotion.Headers{hdrs: %{...}},
 status_code: 200}}

iex> PixelaEx.create_webhook("a-know", "thisissecret", "test-graph", "increment")
{:ok %HTTPotion.Response{body: %{"hashString" => "<WebhookHashString>", "isSuccess" => true, "message" => "Success."},
 headers: %HTTPotion.Headers{hdrs: %{...}},
 status_code: 200}}

Documetation

Documentation can be generated with ExDoc .

Contributing

Contributions are welcome ;)