npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

soundcloud-node-api

v0.0.9

Published

(soundcloud-node-api) ![](https://travis-ci.org/vineetasharma/soundcloud-node-api.svg)

Downloads

7

Readme

#SoundCloud Node API (soundcloud-node-api)

soundcloud-node-api : _soundcloud-node-api is a node js utility module which supports most of the resources available for sound cloud. It is designed get data from Sound Cloud API in a very simplest way. The SoundCloud API exposes resources(rest api) to manage user data, sounds and play-lists. To access public resources(API), you just have to pass a sound_cloud_clientId as parameter. You can get the sound_cloud_clientId by registering the App over developer page.

##How to install

    npm install soundcloud-node-api --save

##How to initialize module example

    var soundCloud = require('soundcloud-node-api')(sound_cloud_clientId);

###User APIs: By using user's APIs, you can access all the resources of User. ####Get All Users of SoundCloud

soundCloud.user.getAllUsers(function (err, result) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Result: ", JSON.parse(result));
  }
});

#####Get a user details by userId

soundCloud.user.getUserDetails(userId,function (err, userDetails) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("userDetails: ", JSON.parse(userDetails));
  }
});

#####Get tracks of a User

soundCloud.user.getUserTracks(userId,function (err, tracks) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Tracks: ", JSON.parse(tracks));
  }
});

#####Get playLists of a User

soundCloud.user.getUserPlaylists(userId,function (err, playLists) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("PlayLists: ", JSON.parse(playLists));
  }
});

#####Get Followings of a User

soundCloud.user.getUserFollowings(userId,function (err, followings) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Followings: ", JSON.parse(followings));
  }
});

#####Get detail of a follower who follows another User, By user id and follower user id

soundCloud.user.getUserFollowingUser(userId,followingId,function (err, followingUser) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("FollowingUser: ", JSON.parse(followingUser));
  }
});

#####Get list of users follows another User

soundCloud.user.getUserFollowers(userId,function (err, followers) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Followers: ", JSON.parse(followers));
  }
});

#####Get a Follower's details of a User

soundCloud.user.getUserFollowerUser(userId,followerId,function (err, follower) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Follower: ", JSON.parse(follower));
  }
});

#####Get Comments of a User

soundCloud.user.getUserComments(userId,function (err, comments) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Comments: ", JSON.parse(comments));
  }
});

#####Get favorite tracks of a User

soundCloud.user.getUserFavorites(userId,trackId,function (err, tracks) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("FavoriteTracks: ", JSON.parse(tracks));
  }
});

#####Get a FavoriteTrack of a User

soundCloud.user.getUserFavoriteTrack(userId,trackId,function (err, track) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("FavoriteTrack: ", JSON.parse(track));
  }
});

#####Get Groups of a User

soundCloud.user.getUserGroups(userId,function (err, groups) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Groups: ", JSON.parse(groups));
  }
});

#####Get WebProfiles of a User

soundCloud.user.getUserWebProfiles(userId,function (err, profiles) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Profiles: ", JSON.parse(profiles));
  }
});

###PlayList APIs: By using Sets/PlayLists APIs, you can access all the resources of PlayList. #####Get a PlayList using playListId

soundCloud.playLists.getAPlaylist(playListId,function (err, playList) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("PlayList: ", JSON.parse(playList));
  }
});

###Tracks APIs: By using Tracks APIs, you can access all the resources of tracks. #####Get a track details using trackId

soundCloud.tracks.getATrack(trackId,function (err, track) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Track details: ", JSON.parse(track));
  }
});

#####Get a track's comments using trackId

soundCloud.tracks.getCommentsForTrack(trackId,function (err, comments) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Track comments: ", JSON.parse(comments));
  }
});

#####Get a comment of a track using trackId & commentId

soundCloud.tracks.getACommentForTrack(trackId,commentId,function (err, comment) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Comment: ", JSON.parse(comment));
  }
});

#####Get the list of users who marked a track as favorite

soundCloud.tracks.getFavoritersOfTrack(trackId,function (err, users) {
  if (err) {
    console.error("Error:", err);
  }
  if (result) {
    console.log("Users: ", JSON.parse(users));
  }
});

##How to test To run tests type: npm test To run tests with coverage type: npm run coverage ##Issues/Bugs :heart:: Sound Cloud Node API Issue Tracker