ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
639 stars 123 forks source link

Add custom auth URLs and simplify `get`/etc methods #356

Closed marioortizmanero closed 1 year ago

marioortizmanero commented 2 years ago

Description

This adds a configurable prefix URL for authentication.

I've also simplified the request methods in the base client. We don't really need get if it's only used in endpoint_get. We can also extend post_form to auth_post, which also prepends the auth URL for convenience, just like endpoint_get. Finally, I've renamed endpoint_get and similars to api_get for consistency and because it's clearer and much shorter.

Motivation and Context

See #350

Dependencies

None

Type of change

Please delete options that are not relevant.

How has this been tested?

I've modified the endpoint_url test, and added another one for auth_url.

Is this change properly documented?

TODO

marioortizmanero commented 1 year ago

Note that #375 should be merged before this.

ramsayleung commented 1 year ago

Everything looks good to me, except for the discussion about how to generate an image file from plantuml file automatically.