How VimeoManager and connections work
masterThe VimeoManager is the core class of the package. It manages multiple Vimeo connections and is bound to the IoC container as vimeo.
Switching Connections
While the facade uses the default connection automatically, you can explicitly call a specific connection using the connection method. This is useful when you have multiple sets of credentials configured.
Managing the Default Connection
You can inspect or change the active default connection at runtime.
Vimeo::connection('name')returns the specified connection.Vimeo::getDefaultConnection()returns the name of the current default connection.Vimeo::setDefaultConnection('name')changes the default connection for subsequent calls.
use Vimeo\Laravel\Facades\Vimeo;
// Explicitly using the 'main' connection
Vimeo::connection('main')->upload('/bar.mp4');
// Using the default connection (identical to the above if 'main' is default)
Vimeo::connection()->upload('/bar.mp4');
// Checking and changing the default
$current = Vimeo::getDefaultConnection(); // returns 'main'
Vimeo::setDefaultConnection('alternative');