ExMarketo

Hexcodecov

ExMarketo is an library to authenticate and communicate with Marketo API.

Features

Installation

Add ex_marketo to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_marketo, "~> 0.1.0"}
  ]
end

Update application config

# config.exs

config :ex_marketo,
  endpoint: "https://123-ABC-456.mktorest.com/rest",
  identity: "https://123-ABC-456.mktorest.com/identity",
  client_id: "client_id",
  client_secret: "client_secret",
  :api, ExMarketo.Api

Update application supervision tree. Start any Tesla adapters before producer and consumer supervisor.

# application.ex
def start(_, _) do
  children = [
    # Any Tesla-adapter
    ExMarketo.Producer,
    ExMarketo.ConsumerSupervisor
  ]
  
  Supervisor.start_link(children, strategy: :one_for_one)
end