Code Monkey home page Code Monkey logo

laravel-spotify's People

Contributors

aerni avatar asifkhankadiwala avatar dependabot-preview[bot] avatar foremtehan avatar tashanduncan avatar unleashed2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-spotify's Issues

/v1/me/

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

invalid_client

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.

Unable to install for laravel 10.10

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?

PHP 8 support?

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].

invalid_client

I did all the steps to obtain data but it does not recognize my credentials and it throws me this error: "invalid_client"

Method can't call statically

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?

"message": "Class 'SpotifyClient' not found"

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.

Upgrade it for Laravel 8

Could you please upgrade this to laravel 8... Looks like there are dependency issues with GuzzleHTTP

Undefined type 'Spotify'.intelephense(1009)

includeGroups('album', 'single', 'appears_on', 'compilation') ->get(); // Now you can work with the $albums array } } ![Capture2](https://github.com/aerni/laravel-spotify/assets/21261716/b8e7e300-5ad7-490d-a192-b1b6257b77ee) this code generate chat gpt and i will try to spotify app data in local host would you like to help me solve error why ?

Add song to playlist

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?

Error Handling Throws New Error

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.

Cant install v1.6

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?

Shows End Point

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.

Popularity

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.

Dynamic API Keys

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.

Dependabot can't resolve your PHP dependency files

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.

View the update logs.

Undefined type 'Spotify'.intelephense(1009)

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?

Laravel 11

Will this get an update with Laravel 11 support?

Thanks! :)

Gives error after following steps

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

Call to a member function getBody() on null

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.