Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Spotify Web Api Php Laravel Package

jwilsson/spotify-web-api-php

View on GitHub
Deep Wiki
Context7

Setting options

There are a few options that can be used to control the behaviour of the API. All options can be set when initializing a new SpotifyWebAPI instance or by using the setOptions() method. Both approaches will merge the new options with the defaults and multiple calls to setOptions() will merge the new options with the ones already set.

$options = [
    'auto_refresh' => true,
    'default_headers' => ['Accept-Language' => 'en-US'],
];

// Options can be set using the SpotifyWebAPI constructor
$api = new SpotifyWebAPI\SpotifyWebAPI($options);

// Or by using the setOptions method
$api->setOptions($options);

Available options

auto_refresh

  • Possible values: true/false (default)

Used to control automatic refresh of access tokens.

auto_retry

  • Possible values: true/false (default)

Used to control automatic retries of rate limited requests.

default_headers

  • Possible values: [] (default)

Used to set default HTTP headers that will be included in every request. For example Accept-Language to force Latin alphabet in returned results. Passed as key-value pairs, e.g. ['Accept-Language' => 'en-US'].

return_assoc

  • Possible values: true/false (default)

Used to control return type of API calls. Setting it to true will return associative arrays instead of objects.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views