Docs incorrect or hard to follow?

Tweet me

so I can make things better! 😊

Soundcloud Wrapper

Reposts

API for interacting with the reposts API endpoint.

Example

Tweak example to fit your tech stack and use case.
reposts-controller.ts
import SoundCloud from "soundcloud-wrapper"
 
const sc = new SoundCloud(
  process.env.CLIENT_ID,
  process.env.CLIENT_SECRET,
  process.env.REDIRECT_URI
  process.env.PKCE_CODE_VERIFIER
)
 
// get auth token stored in db
// check the auth flow guide if you need to generate a token
const token = await Token.find({userId: 123456789})
const trackId = '987654321'
 
const reposts = await sc.reposts.repostTrack(token, trackId)
return res.status(200).json(reposts)

repostTrack

Reposts the specified track.

reposts-controller.ts
// method: POST
const reposts = await sc.reposts.repostTrack(token, trackId)
PropTypeDefault
token
string
-
trackId
number
-

removeRepostTrack

Removes the repost of the specified track.

reposts-controller.ts
// method: DELETE
const reposts = await sc.reposts.removeRepostTrack(token, trackId)
PropTypeDefault
token
string
-
trackId
number
-

repostPlaylist

Reposts the specified playlist.

reposts-controller.ts
// method: POST
const reposts = await sc.reposts.repostPlaylist(token, playlistId)
PropTypeDefault
token
string
-
playlistId
number
-

removeRepostPlaylist

Reposts the specified playlist.

reposts-controller.ts
// method: DELETE
const reposts = await sc.reposts.removeRepostPlaylist(token, playlistId)
PropTypeDefault
token
string
-
playlistId
number
-

More Info

For more info on endpoints see the official Soundcloud API docs.

On this page