Weave 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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table