An open API service indexing awesome lists of open source software.

https://github.com/adolfosilva/soundcloud

Soundcloud API client for Elixir
https://github.com/adolfosilva/soundcloud

api-client api-wrapper elixir soundcloud

Last synced: 7 days ago
JSON representation

Soundcloud API client for Elixir

Awesome Lists containing this project

README

          

# Soundcloud [![Build Status](https://travis-ci.org/adolfosilva/soundcloud.svg?branch=master)](https://travis-ci.org/adolfosilva/soundcloud) [![Hex Package](http://img.shields.io/hexpm/v/soundcloud.svg?style=flat)](https://hex.pm/packages/soundcloud) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A Soundcloud API wrapper written in Elixir.

## Usage

```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"
```

## Installation

Add `soundcloud` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:soundcloud, "~> 0.1.0"}
]
end
```

Then configure your `config/dev.exs` (or whatever mix env you want to use), like this:

```elixir
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](LICENSE) for details.