A Soundcloud API wrapper written in Elixir.
iex> {:ok, client} = Soundcloud.client(client_id: "foobartar", access_token: "72-27has7d2-7afajf92")
iex> r = Soundcloud.Client.get(client, "/me/tracks", limit: 1)
iex> length(r)
1
iex> List.first(r).title
"Be my Love"
Add soundcloud
to your list of dependencies in mix.exs
:
def deps do
[
{:soundcloud, "~> 0.1.0"}
]
end
Then configure your config/dev.exs
(or whatever mix env you want to use), like this:
config :soundcloud, :auth,
client_id: System.get_env("SOUNDCLOUD_CLIENT_ID"),
access_token: System.get_env("SOUNDCLOUD_ACCESS_TOKEN")
And don't forget to set the environment variables in your shell.
You can find the documentation at https://hexdocs.pm/soundcloud/
This software is licensed under the MIT license. See LICENSE for details.