/soundcloud

Soundcloud API client for Elixir

Primary LanguageElixirMIT LicenseMIT

Soundcloud Build Status Hex Package License: MIT

A Soundcloud API wrapper written in Elixir.

Usage

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"

Installation

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.

Documentation

You can find the documentation at https://hexdocs.pm/soundcloud/

License

This software is licensed under the MIT license. See LICENSE for details.