Open yoshuawuyts opened 5 years ago
@yoshuawuyts You would mind if I gave this a try? :)
@AZanellato that'd be fantastic, please do!
@yoshuawuyts I've been giving this a try and got a bit stuck in regards with the type of surf::Client
, like discussed here: https://github.com/rustasync/surf/issues/54
I am trying to do a struct like the one you posted above
struct Sdk {
client: surf::Client,
credentials: VerifiedCredentials
}
But then I need to pass a type to Client
and that got me a bit stuck :/
I was talking to @davidbarsky today, and something that would be great to document is how to build an SDK fronted by some sort of login function. This should probably become a proper example (perhaps for GitHub or something?) but here's an initial sketch:
Usage
Implementation