* refactor: Introduce SpotifyUri struct
Contributes to #1266
Introduces a new `SpotifyUri` struct which is layered on top of the
existing `SpotifyId`, but has the capability to support URIs that do
not confirm to the canonical base62 encoded format. This allows it to
describe URIs like `spotify:local`, `spotify:genre` and others that
`SpotifyId` cannot represent.
Changed the internal player state to use these URIs as much as possible,
such that the player could in the future accept a URI of the type
`spotify:local`, as a means of laying the groundwork for local file
support.
* fix: Don't pass unknown URIs from deprecated player methods
* refactor: remove SpotifyUri::to_base16
This should be deprecated for the same reason to_base62 is, and could unpredictably throw errors -- consumers should match on the inner ID if they need a base62 representation and handle failure appropriately
* refactor: Store original data in SpotifyUri::Unknown
Instead of assuming Unknown has a u128 SpotifyId, store the original data and type that we failed to parse.
* refactor: Remove SpotifyItemType
* refactor: Address review feedback
* test: Add more SpotifyUri tests
* chore: Correctly mark changes as breaking in CHANGELOG.md
* refactor: Respond to review feedback
* chore: Changelog updates
* core: Create credentials from access token via OAuth2
* core: Credentials.username is optional: not required for token auth.
* core: store auth data within session. We might need this later if need to re-auth and original creds are no longer valid/available.
* bin: New --token arg for using Spotify access token. Specify 0 to manually enter the auth code (headless).
* bin: Added --enable-oauth / -j option. Using --password / -p option will error and exit.
* core: reconnect session if using token authentication
Token authenticated sessions cannot use keymaster. So reconnect using the reusable credentials we just obtained. Can perhaps remove this
workaround once keymaster is replaced with login5.
* examples: replace password login with token login
- Change the return type of metadata convenience iter functions to
actual iterators instead of allocated collections
- The iterator item type is set to be a reference
Re-add default impl to SessionConfig and make Credentials::with_password generic over Into<String>
add docs for Credential
reintroduce old Default impl for SessionConfig
use the third argument for the track-to-play rather than a testing id