spotify / apps-tutorial Goto Github PK
View Code? Open in Web Editor NEWA Spotify App that contains working examples of the use of Spotify Apps API
Home Page: https://developer.spotify.com/technologies/apps/
A Spotify App that contains working examples of the use of Spotify Apps API
Home Page: https://developer.spotify.com/technologies/apps/
I'm developping my own app so:
spotify:app:my_app
spotify:app:api-tutorial
spotify:app:views-tutorial
as well !Of course the "reload app" in developper menu doesn't work all the time (but it might be my fault most of the time tough: I'm still "discovering" html5 :/ )
So I have to copy/paste these 3 strings ALL THE TIME !!!
developper_manifest.json
in the Spotify directory, listing the "default dev apps" to load ?pretty, pretty Please !!
Is there a .js file available that will allow a user to communicate via JavaScript with the Spotify API in a web browser instead of the Spotify app? I'm mind-boggled at the moment about having to use the in-app browser to build this. Also, I'm sure for the Spotify team this seems completely normal, but I did not see anything in the documentation that made me feel like the JavaScript API would be an in-app thing. Maybe I am missing something?
Thanks for your help/time
Set up my directories for the tutorial on Mac OS X with latest version of Spotify. Set up Dev on account. Searched for spotify:app:tutorial, received the following.
Not Installed
Application is not installed
Hi guys,
I'm trying to load the artists rom the current user library:
require(['$api/library#Library'], function(Library) {
Library.forCurrentUser().artists
.snapshot()
.done(function(snapshot) {
var len = snapshot.length;
for (var i = 0; i < len; i++) {
var a = snapshot.get(i);
console.log(a);
}
});
});
But I get this error on console:
TypeError: Cannot call method 'snapshot' of null
I also tried this, to ensure that the artists property is available on the object:
require(['$api/library#Library'], function(Library) {
Library.forCurrentUser().load("artists").done(function(library) {
library.artists.snapshot().done(function(snapshot) {
var len = snapshot.length;
for (var i = 0; i < len; i++) {
var a = snapshot.get(i);
console.log(a);
}
});
});
});
But the artists property is always null.
Is there any other way to get the artists from the current user library?
Thanks
I just tried the google maps tutorial on 0.8.4.124.ga3559d86
And I get:
index.html:73
Uncaught TypeError: Cannot call method 'addDomListener' of undefined
However it does work in the browser...
When I type "spotify:app:api-tutorial" into the search bar, I get the following error:
Missing Dependencies
Framework compatible with api (version 1.38.0) does not exist
I'm using desktop client version 0.9.4.183 in Linux Mint 15.
Thanks
calling:
tell application "Spotify"
if it is running then
set sound volume to (sound volume * .10)
end if
end tell
then:
tell application "Spotify"
if it is running then
set sound volume to (sound volume * 10)
end if
end tell
Lowers the volume of the app
App should go back to the original volume (as rdio and iTunes do)
I tried to get the api/Location to work.
When using
require(["$api/Location"], function(Location) { });
I get the error:
Uncaught Error: Could not load file "$api/scripts/Location.js"; Not found.
Hi,
thanks a lot for this tutorial, but I followed the description, created the folder, pulled the content from your Repository and uninstalled my old version of Spotify and installed the newest one. But I still get the "Not Installled - Application is not installed" in spotify when I run the search.... and yes I've enabled. Any ideas?
Sign up for a developer account on Spotify -> http://developer.spotify.com/en/spotify-apps-api/developer-signup/
404
Open Spotify and type "spotify:app:api-tutorial"
should it be?
Open Spotify and type "spotify:app:apps-tutorial"
Hey, I'm setting up an app to play a themesong for each developer when we push code to github.
I have a server that I want to poll for updates, but I'm having difficulty accessing that data via the client. I'm confused as to why the following works properly when requesting data from twitter but fails when requesting from my server hosted on heroku.
xhr = new XMLHttpRequest()
# request = 'http://search.twitter.com/search.json?q=open.spotify.com%2Ftrack&include_entities=true'
request = 'http://shipify-server.herokuapp.com/'
xhr.open('GET', request)
xhr.onreadystatechange = ()->
if (xhr.readyState != 4)
return
console.log xhr
data = JSON.parse(xhr.responseText)
handle(data)
xhr.send(null)
handle = (data)->
console.log data
Please show how to use the dark track listings mentioned in https://developer.spotify.com/technologies/apps/guidelines/design/#alwaysusenativetracklistcomponent
I'm still getting the Not installed-error despite following the procedure for the app-tutorial...
Win 7 64bit
C:\Program Files (x86)\Spotify
build: 0.9.6.81.gd359a796
C:\Users\Waveshell\My Documents\Spotify\api-tutorial
I have, of course, restarted Spotify several times...
Ideas?
In order to get a Playlist.subscribers count, I'm doing this:
var playlist = models.Playlist.fromURI(playlist_uri)
playlist.subscribers.snapshot().done(function(users) {
console.log('users', users.function)
})
But I get this error on console:
TypeError: Cannot call method 'snapshot' of undefined
Of course, the playlist is a valid one.
I'm using Preview API (1.0)
some of the existing tutorials (such as play a list of songs, and play a song) use code like:
var playerView = new views.Player();
from the API docs it seems that's deprecated to models.player
instead. i tried the former to and had consistent crashes. can you update the tuts to the latest spec?
I'm a Japanese developer and unable to sign up Spotify because it is not available in my country.
But is there any way to try this app-tutorial without signing up using for instance a dummy account?
I couldn't find a good way to raise issues with the Spotify API, so this tutorial seemed like the best bet.
The Spotify API includes a Promise
class (see here). I like promises so I'm pleased to see you embracing them in your API. The problem is that these promises don't behave in anything like the way that promises in JavaScript are expected to behave. Promises in JavaScript have been specified by Promises/A+
This specification is being adopted as a basis for DOM Promises. It also has wide support on es-discuss so it seems likely that this, or something similar, will be adopted once Promises become a native part of ecmascript (probably in ES7).
The specification also has a large number of existing implementations (https://github.com/promises-aplus/promises-spec/blob/master/implementations.md). All of these are fully inter-operable, so they provide useful tools that can help compose async operations across multiple different promises libraries.
If you do choose to go down this route, there is an extremely comprehensive test suite to help you to establish your compliance here
Based on what your documentation is stating here https://developer.spotify.com/docs/apps/api/1.0/api-library.html
require(['$api/library#Library'], function(Library) {
var library = Library.forCurrentUser();
library.starred.snapshot(0, 1).done(function(snapshot) {
snapshot.get(0).load('name').done(function(track) {
console.log('You have starred ' + track.name);
});
});
});
this snippet of code is throwing an error, since you're trying to call the snapshot
method on library.starred
which is a type of Playlist
, which inherits from Models
type and not the Collection
one, so the snapshot
method wouldn't be available at all.
Instead, you first have to load the correct property of the model (in this case, tracks
, which inherits from the Collection
type), and then call the snapshot method:
library.starred.load('tracks').done(function(playlist) {
playlist.snapshot(0,50).done(function(snapshot) {
// you can now access starred tracks
console.log(snapshot.get(0))
})
})
This was the only way I found to get starred tracks for the current user.
Is your doc correct?
Tnx.
PS: Let me know if you need further code/examples
The right shortcut to use inside Spotify search field is
spotify:app:api-tutorial
since the last manifest.json reports
"BundleIdentifier": "api-tutorial",
I have seen some other people having issues with loading their api-tutorial application inside the spotify client. I tried to load the api-tutorial both on my Windows and Linux computer but both did not succeed. I am wondering, because I have seen alot of people saying if you register a developer account you will get a menu item called 'Develop'. But I cannot see this, even when I reinstalled my Spotify.
I have created the Spotify folder inside C:/Users/David/My Documents/ and also (because I run a dutch version of windows) C:/Users/David/Documenten (this is also automatically translated by windows? because I also see this when Right-click as C:/Users/David/Documents/).
I also placed the newest version of the api-tutorial in there.
Nothing works, I tried for 2 days now.
Hi,
I'm basically copy-pasting the code for the drag and drop feature, and it's not working for what I'd like to use it for.
I'm trying to drop a playlist from the left onto my drop-box. The manifest is set up as stated, application reloaded, drop-box is present and I've even given it proper height and width, and still nothing.
What am I missing?
Hi! I would like to make an HTML5 visualizer for Spotify. Does your plugin API provide any access to the waveform?
Why did you drop support for commonjs like "require" syntax?
I find it to be more comfortable, mantainable and readable.
Hi,
I'm trying to clean my app by using what's described in your API preview page, but I get errors...
For instance models.application.addEventListener('activate', my_fonction);
will give me Object #<Application> has no method 'addEventListener'
for this one, I'm refering to
https://developer.spotify.com/technologies/apps/docs/preview/api/api-models-application.html
Is this next API already available for us ?
Thanks
How can i authenticate user with app using facebook & get Facebook Id ? Both are not implemented in demo code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.