0.1.4 • Published 4 years ago

soundcloud-v2-api v0.1.4

Weekly downloads
3
License
MIT
Repository
-
Last release
4 years ago

Soundcloud v2 API Controller

This API controller was created for personal implementation in my project called Soundify. Soundcloud does not currently provide a method for interacting with the new v2 API effectively. The v1 API is missing a lot of endpoints the v2 api has. (/charts to name one).

Navigation

Installation

via NPM

npm i soundcloud-v2-api

via YARN

yarn add soundcloud-v2-api

Usage

Example (Searching Tracks)

const SC = require('soundcloud-v2-api');

SC.init({
 clientId: 'YOUR_CLIENT_ID'
})

SC.get('/search/tracks', {
 q: 'Post', 
 limit: 50
}).then(result => console.log(result))

Example (Streaming Tracks)

//Initialize as in previous example.

SC.stream('/tracks/${track.id}/streams').then(stream => {
 stream.play()
})

Usage in browsers

SC.init({
 clientId: 'YOUR_CLIENT_ID',
 cors: true
})

API Reference

Here are some of the most common endpoints available to use.

/search/:type

TypesReturns
tracksList of tracks containing query
usersList of users containing query
albumsList of albums containing query
playlistsList of playlists containing query

/tracks/${track.id}/:type

TypesReturns
/Tracks statistics and information
repostersList of users that reposted the track
likersList of users that liked the track
commentsList of comments on the track
0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago