ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
632 stars 121 forks source link

Getter and Setter of playlist api endpoint #439

Open tomkimsour opened 1 year ago

tomkimsour commented 1 year ago

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.

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

ramsayleung commented 1 year ago

You could take the current_playing endpoint for example, test your new endpoint by

  1. Add an example file
  2. Add an entry in cargo.toml
  3. 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.
tomkimsour commented 1 year ago

So no unit testing ? just an example instead ?

ramsayleung commented 1 year ago

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.