rspotify
rspotify copied to clipboard
Getter and Setter of playlist api endpoint
Description
Please include a summary of the change and which issue is fixed Getter and setter for playlist cover are missing as mentioned here #377 and #438
Motivation and Context
Please also include relevant motivation and context.
Dependencies
None
Type of change
Please delete options that are not relevant.
- [x] New feature (non-breaking change which adds functionality)
How has this been tested?
I am yet trying to test both function under test_with_oauth.rs by creating a playlist, adding a cover, retrieving it and comparing both. However I need guidance on how to test it as I am not able to figure out how to oauth for the tests. I am not sure what are the variable values required in the .env and even if I put a wrong value, it doesn't seem like the value is being read.
Is this change properly documented?
yes
You could take the current_playing
endpoint for example, test your new endpoint by
- Add an example file
- Add an entry in cargo.toml
- Run your example with
cargo
:cargo run --example your-new-example --features env-file,cli,client-reqwest
, the cli will prompt you to authenticate and get the auth code.
So no unit testing ? just an example instead ?
The example acts like an end-to-end test for the new endpoint, because as we discussed in this issue: https://github.com/ramsayleung/rspotify/issues/154#issuecomment-1699115854, there is no workable approach for us to run unit test.