Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ed Moore
    @eddiemoore
    Hello @Drenerdo
    Brandon Jewell
    @roycejewell
    @eddiemoore Have you done any name changes recently? for instance the Spotify.following() does not show any signs of making an api call
    Ed Moore
    @eddiemoore
    @roycejewell Ahh no I haven't. Strange. Are other calls working?
    eyeswideopen
    @eyeswideopen
    Hey, I'm having trouble to get going with the framework, as it seems to ignore my api call parameters. Example
    Spotify.getSavedUserTracks(5).then(function (data) {
                console.log(data.items.length);
            });
    `
    outputs 20, which sould be 5 and the second parameter (limit) isn't used either. Am i getting something wrong @eddiemoore ?
    Ed Moore
    @eddiemoore
    It takes an options object. {limit:5} not a single number
    eyeswideopen
    @eyeswideopen
    Ouch, my bad. Thanks!
    Can use limit and offset
    Let me know if you have any other issues
    eyeswideopen
    @eyeswideopen
    Works like a charm, thanks for the quick help (and the amazing framework)!
    Ed Moore
    @eddiemoore
    No problem.
    Thanks for using it :)
    Hackbard
    @Hackbard
    Hi there
    some boring question ... can i use the spotify lib in angular2 ?
    Ed Moore
    @eddiemoore
    @Hackbard That is a good question. I honestly haven’t tried angular 2. And haven’t updated the library in quite a long time as i’ve had a lot of other things on. Been hopeing to update this for quite a long time.
    Having a kid really makes you have no more free time haha
    Irena A.
    @rensftw
    Hello @eddiemoore I'm having some trouble getting started with the plugin. I'm trying to figure out why the search function doesn't return any results, here's my JS code:
    (function (angular) {
        'use strict';
        var app = angular.module('musicApp', ['ngMaterial', 'ngAnimate', 'ngAria', 'spotify']);
        app.controller('spotifyController', ['$scope', 'spotify', function ($scope, spotify) {
    
            $scope.search = function () {
                spotify.search($scope.searchText, 'artist').then(function (data) {$scope.artists = data.artists.items; });
    
            }; 
        }]);
    
    }(window.angular));
    I have also tried with Spotify instead of spotify in my controller but to no avail
    Irena A.
    @rensftw
    Here is a snippet of my .HTML
    <div class="col-xs-12 col-md-8">
                <form>
                <h1>Music Search</h1>
    
                    <input class="input" type="text" ng-model="spotifyController.searchText" ng-change="spotifyController.search()" placeholder="Search artist or album..">
    
                 </form><br>
                <!--Tests-->
                {{spotifyController.searchText}}
                <p>test: 1 + 2 = {{1 + 2}}</p>
                <!--Search Results-->
                  <ul>
                    <li ng-repeat="artist in artists">
                      <a class="media" ng-href="{{artist.external_urls.spotify}}" target="_blank">
                        <img ng-src="{{artist.images[0].url}}" alt="">
                        <div class="media-details">
                          {{artist.name}}
                        </div>
                      </a>
                    </li>
                  </ul>
    Ed Moore
    @eddiemoore
    Hi @rensftw are there any errors in the console?
    Ed Moore
    @eddiemoore
    Oh I see the issue. When you are injecting into the controller, it needs to be Spotify with a captial S
    Ed Moore
    @eddiemoore
    @rensftw let me know if you are still having issues
    Irena A.
    @rensftw
    @eddiemoore I changed my controller injection but it still doesn't work. Here's what my JS file looks like now
    (function (angular) {
        'use strict';
        var app = angular.module('musicApp', ['ngMaterial', 'ngAnimate', 'ngAria', 'spotify']);
    
        app.config(function (SpotifyProvider) {
            SpotifyProvider.setClientId('67251d5f261a474ca56f252008a6fe72');
            SpotifyProvider.setRedirectUri('http://localhost:8888/callback');
            SpotifyProvider.setScope('playlist-read-private');
        });
    
        app.controller('spotifyController', ['$scope', 'Spotify', function ($scope, Spotify) {
            $scope.search = function () {
                Spotify.search($scope.searchText, 'artist').then(function (data) {$scope.artists = data.artists.items; });
            }; 
        }]);
    
    }(window.angular));
    No errors show up in the console when I open the index.html. Also, no errors when app.js runs through JSlint on my text editor.
    Irena A.
    @rensftw
    I'm thinking it might not be establishing connection to the Spotify API, so I added the .config part to see what happens, but there it makes no difference :D
    Ed Moore
    @eddiemoore
    @rensftw What version of angular are you using?
    Irena A.
    @rensftw
    I'm using v1.6.2
    Ed Moore
    @eddiemoore
    @/all I have just published an updated version which works with angular 1.6
    Please try it out an let me know if you run into any more issues
    Voyagone
    @Voyagone_twitter
    Will this work on the latest Angular version?
    Ed Moore
    @eddiemoore
    @Voyagone_twitter I dont think it will work on angular 2, although I haven’t tested so i’m not sure. It does with with the latest v1 Angular though
    Punita Ojha
    @punitaojha
    This message was deleted
    Dipl.-Ing. (FH) Johannes Neugschwentner
    @joehannes
    hi guys!
    this is a bit off topic, but I hope you guys pardon me and someone can quickly fire up his postman
    I've created an angular spotify app
    now as of today spotify service stopped working
    I need to know if my ip is blacklisted by spotify or if this is a global change to the Spotify API
    when doing a request to: https://api.spotify.com/v1/search?q="kings and queens"&type=album,artist
    it should simply return the result without the needs of authorization
    in my case I get 401: no token supplied
    that's only since today
    can someone dblchk this for me? https://api.spotify.com/v1/search?q="kings and queens"&type=album,artist
    simple http query and tell me if you get a 401 or a result
    sorry for that, don't know where else to ask
    oh, having said that, I'm gonna ask in angularjs ... thx
    sulekha-1209
    @sulekha-1209
    Hi this might be a very basic question but is there a way i can use angular-spotify with Angulr 6?
    if so, what is the equivalent of doing this var app = angular.module('example', ['spotify']); in angular 6?
    sulekha-1209
    @sulekha-1209
    Asking coz I am getting this error - Uncaught ReferenceError: angular is not defined
    at angular-spotify.js:545
    Ed Moore
    @eddiemoore
    This library hasn't been updated in years and I havent used angular since version 1 so i would recommend using the plain JS library that can be found on the Spotify developers site.