ExCrowdin.API behaviour (ex_crowdin v0.1.1)

Utilities for interacting with the Crowdin API v2.

Link to this section Summary

Functions

In config.exs, use a string, a function or a tuple

In config.exs your implicit or expicit configuration is

In config.exs, use a string, a function or a tuple

Link to this section Types

Specs

body() :: iodata() | {:multipart, list()}

Specs

headers() :: %{required(String.t()) => String.t()} | %{}

Specs

method() :: :get | :post | :put | :delete | :patch

Link to this section Functions

In config.exs, use a string, a function or a tuple:

config :ex_crowdin, access_token: System.get_env("CROWDIN_ACCESS_TOKEN")

or:

config :ex_crowdin, access_token: {:system, "CROWDIN_ACCESS_TOKEN"}

or:

config :ex_crowdin, access_token: {MyApp.Config, :crowdin_access_token, []}

Specs

json_library() :: module()

In config.exs your implicit or expicit configuration is:

config ex_:crowdin, json_library: Poison # defaults to Jason but can be configured to Poison

In config.exs, use a string, a function or a tuple:

config :ex_crowdin, project_id: System.get_env("CROWDIN_PROJECT_ID")

or:

config :ex_crowdin, access_token: {:system, "CROWDIN_PROJECT_ID"}

or:

config :ex_crowdin, access_token: {MyApp.Config, :crowdin_project_id, []}
Link to this function

project_path(project_id, path)

Link to this function

request(path, method, body \\ "", headers \\ %{}, opts \\ [])

Specs

request(String.t(), method(), body(), headers(), list()) ::
  {:ok, map()} | {:error, Error.t()}

Link to this section Callbacks

Link to this callback

project_path(arg1, arg2)

Specs

project_path(String.t(), String.t()) :: String.t()