ExConnpass
Elixir wrapper for connpass api.
Installation
def deps do
[
{:ex_connpass, "~> 0.2.1"}
]
endUsage
$ mix deps.get
$ iex -S mixiex> ExConnpass.run(%{query: [keyword: "elixir"]})Since ex_connpass uses commandex, the return value will look like this.
%ExConnpass{
data: %{api_url: nil, events: nil, response: nil},
errors: %{},
halted: false,
params: %{query: nil},
pipelines: [:build_url, :call_api, :decode],
success: false
}To retrieve the results of the API, like this:
ExConnpass.run(%{query: [keyword: "elixir"]})
|> case do
%{success: true, data: %{events: events}} ->
# use events...
%{success: false} ->
# error handling...
endConfig
If you want to change the domain when running the test, you can change api_base_url like this:
import Config
config :ex_connpass, api_base_url: "http://localhost:8081/"