aerni / laravel-spotify Goto Github PK
View Code? Open in Web Editor NEWSpotify for Laravel is a simple wrapper around the Spotify Web API that makes working with its endpoints a breeze!
License: MIT License
Spotify for Laravel is a simple wrapper around the Spotify Web API that makes working with its endpoints a breeze!
License: MIT License
Hello, is it possible to use the /v1/me/player for e.g? I can't seem to get that working:
public function mePlayer(): PendingRequest
{
$endpoint = '/me/player';
return new PendingRequest($endpoint);
}
In the Spotify.php, but it says:
Aerni\Spotify\Exceptions\SpotifyApiException
Invalid username
I'm having the same issue as maritojhefi. Get the SpotifyAuthException 'invalid_client'. Also tried adding domain and localhost callback urls. Can't seem to fix this issue.
I am trying to install it for laravel 10.10 and I am unable to install it. Can you please provide solution How I can install it for laravel 10?
Looks like there is no PHP 8 support? Is this a simple bump in the composer.json?
Trying to install (composer require), this is what I see.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- kozz/laravel-guzzle-provider 6.1.0 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- kozz/laravel-guzzle-provider[6.1.1, ..., 6.1.3] require php ^7.2.0 -> your php version (8.0.0) does not satisfy that requirement.
- aerni/laravel-spotify[v1.1.0, ..., v1.2.0] require php 7.2.* || 7.3.* -> your php version (8.0.0) does not satisfy that requirement.
- aerni/laravel-spotify[v1.3.0, ..., v1.3.1] require php 7.2.* || 7.3.* || 7.4.* -> your php version (8.0.0) does not satisfy that requirement.
- aerni/laravel-spotify[v1.4.0, ..., v1.5.0] require php ^7.4 -> your php version (8.0.0) does not satisfy that requirement.
- aerni/laravel-spotify v1.0.0 requires kozz/laravel-guzzle-provider ^6.1 -> satisfiable by kozz/laravel-guzzle-provider[6.1.0, 6.1.1, 6.1.2, 6.1.3].
- Root composer.json requires aerni/laravel-spotify ^1.0 -> satisfiable by aerni/laravel-spotify[v1.0.0, ..., v1.5.0].
How Can I set Auth Token Manually without using SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET?
I need to gather data from 5 to 100 offset as limit 1. It should rate limit friendly. Is there any suitable way to do this?
There's a couple of new API endpoints, which can be added to this package.
i was read the documentation, but i didn't see any usage example that we can control music
I did all the steps to obtain data but it does not recognize my credentials and it throws me this error: "invalid_client"
I tried to do as your documentation but i got error
Non-static method Aerni\Spotify\Spotify::featuredPlaylists() should not be called statically
And I also tried to call non statically like new Spotify()
but the constructor need 1 parameter and I don't know what to pass as parameter in constructor.
Any help?
Hi, i'm new in your repo and my laravel give me that error. What am i possibly wrong? Maybe config or anything? Thank you
I looked into the package asswell and in the vendor/aerni/laravel-spotify/src/SpotifyAuth.php"
use SpotifyClient , does not exist in this namespace. Instaed there is on ein src/SpotifyClient that extends Client.
I tried swapping both but I cant achieve the expeected results.
Could you check this please?
by the way, this can be reproduced by exactly follosing the instructions on the install page (Readme).
thanks once more for the great package and I appreaciate your response.
Could you please upgrade this to laravel 8... Looks like there are dependency issues with GuzzleHTTP
Hi,
Great package, is it possible to retrieve a users public playlists?
Thanks
Hi,
Is there any way to use this wrapper to add songs to a specific user playlist?
I can only see methods to fetch songs from a playlist :(
Any plans to add this in the future?
Errors are not being handled correctly. When an error occurs with the API, this package creates another error instead of logging or presenting the API error.
ErrorException: Attempt to read property "error" on null in /var/www/html/vendor/aerni/laravel-spotify/src/SpotifyRequest.php:40
We don't know what Spotify API complained about, as the error was not handled.
Thanks for sharing this package.
composer require aerni/laravel-spotify "1.6.0"
[InvalidArgumentException]
Could not find package aerni/laravel-spotify in a version matching 1.6.0
I think it's not updated in the package repo?
I don't know why, it's work fine in localhost but I get that error when I running it on live server, any ideas ?
Is there any way to return paginated results using laravel's default pagination functionality?
I am currently having some issues connecting to the shows end points.
The error I get is:
Aerni\Spotify\Exceptions\SpotifyApiException : non existing id
The error itself is incorrect because it actually appears to be an access token related issue (but this is a Spotify API error rather than from the package itself)
If I manually swap out the access token for one which I generate through the authorize page then I can get it to work. It doesn't look like I need a higher level access token but maybe you could help.
Hi,
Can you implement the Get User's Saved Tracks ?
https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-users-saved-tracks
Many thanks for your support
Guilux
Anybody has any idea how to get the popularity of a track? I see it in the API but cant seem to figure out where it is. It does not show in the response.
Is there a way to set api keys based on user? For instance. I can set it in the ENV but I would like to have a more database driven solution on requests. So If somone Logins they can run the requests through their API keys.
laravel-spotify: 1.2/1.3/1.4
Laravel 7
PHP 7.3
How Can I solve this?
Dependabot can't resolve your PHP dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: HTTP request failed!
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
I have the same issue as the last guy. I did everything on the readme file and even asked chatGPT but i still cant use your library becaus it says that Spotify is an undefined type.
I also tried using this "use Aerni\Spotify\Spotify;" but it also didn't work.
Do you know whats wrong?
Will this get an update with Laravel 11 support?
Thanks! :)
So I'm using this package: https://github.com/aerni/laravel-spotify for a project, and I've followed the "Usage-steps", but I keep getting this error:
Non-static method Aerni\Spotify\Spotify::searchTracks() should not be called statically
when I do it the way the package says.
This is my code:
public function index()
{
$variable = Spotify::searchTracks('Wish You Were Here')->get();
dd($variable);
return view('pages.index');
}
with
use Aerni\Spotify\Spotify;
on top of the file. Because of the error I tried this:
(new Spotify)->searchTracks('Wish You Were Here')->get();
but I get this error:
Too few arguments to function Aerni\Spotify\Spotify::__construct(), 0 passed in C:\ProjectDirectory\hetplatenhuis-newversion\app\Http\Controllers\Pages\IndexController.php on line 13 and exactly 1 expected
I get this error trying to call SpotifyAuth->getAccessToken();
See code:
$clientId = config('spotify.auth.client_id');
$clientSecret = config('spotify.auth.client_secret');
$spotifyAuth = new SpotifyAuth($clientId, $clientSecret);
var_dump($spotifyAuth);
// $spotifyAuth->getAccessToken();
var_dump gives
object(Aerni\Spotify\SpotifyAuth)#295 (2) { ["clientId":"Aerni\Spotify\SpotifyAuth":private]=> string(32) "XXXXXX" ["clientSecret":"Aerni\Spotify\SpotifyAuth":private]=> string(32) "XXXXXX" }
cliend ID and Secret hidden for obvious reasons.
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.