I'm a Ruby on Rails developer and am now venturing into Go for doing some podio.com API calls. Everything went smoothly so far but I bumped into a small and stupid problem for which I find no answer on the mighty stackoverflow (probably because I don't know what to search for).
A bit of context: Our rails app is already handling all the podio oAuth server-flow we have all the necessary client information (auth_token, refresh_token, ...) and do not need to request that information again.
Instead of doing
podio.AuthWithAuthCode(clientId, clientSecret, authCode, redirectUri)
I wish to directly create a client object like so
// json data coming from rails
json_auth_token := "{\"access_token\":\"...\",\"refresh_token\":\"...\",\"token_type\":\"\",\"expires_in\":28800,\"transfer_token\":\"\"}"
// creating a AuthToken object
authToken := podio.AuthToken{}
json.Unmarshal([]byte(json_auth_token), &authToken)
// so far so good, but when doing
client := podio.NewClient(authToken)
I get the error
cannot use authToken (type podio.AuthToken) as type *podio.AuthToken in argument to podio.NewClient
Can somebody help me with this? It is not necessarily Podio related. More go related