oxidecomputer / third-party-api-clients

A place for keeping all our generated third party API clients.
https://docs.rs/octorust
MIT License
133 stars 56 forks source link

[github] Add `HttpCache::in_dir` constructor to allow for custom cache placement #59

Closed ginger51011 closed 1 year ago

ginger51011 commented 1 year ago

Before only the home dir could be used, this makes it a bit more ergonomic if the user has other desires.

augustuswm commented 1 year ago

Makes sense to me. Only suggestion is that in_home_dir get replaced with:

pub fn in_home_dir() -> BoxedHttpCache {
    Self::in_dir(&dirs::home_dir().expect("Expected a home dir"))
}
ginger51011 commented 1 year ago

Makes sense to me. Only suggestion is that in_home_dir get replaced with:

Good point, added that!