Permalink
Browse files

some progress on the API doc

  • Loading branch information...
1 parent d076d17 commit 5e1aa358584e2668bee9683be6f3f0c354e8fba9 @rsms rsms committed Jul 21, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 doc/api.md
View
@@ -56,7 +56,7 @@ Note that your program will not exit by itself until you have logged out a logge
Search the Spotify catalouge.
-`query` can be either a string (search query) or an object:
+`query` can be either an object:
var query = {
query: "album:belle", // [required] query string
@@ -72,6 +72,13 @@ Search the Spotify catalouge.
sys.puts(sys.inspect(result.tracks));
});
+...or it can be a simple string:
+
+ session.search("album:belle", function(err, result){
+ if (err) throw err;
+ sys.puts(sys.inspect(result.tracks));
+ });
+
### spotify.Session.prototype.getTrackByLink(link[, callback(err, track)]) -> track
Look up a track from a track link (URI or URL). If a callback function is passed as the 2nd argument, that callback will be called when the track's info has loaded:

0 comments on commit 5e1aa35

Please sign in to comment.