# README
Strava API Client
A client to access APIs provided by Strava.
API Version
This client is implemented for Strave API v3.
Authtication
Strave uses OAuth2 for their APIs. This client uses TokenSource from oauth2 for authentication. Have a look at Getting Started with the Strava API to get details about how to authenticate your app to access the API. Base of OAuth2 authentication is oauth2.Config where you specifiy your client id, client secret and scopes.
Helper
There're to helper to create required token source. Both methods expect a oauth2.Config.
TokenSourceFromAuthorizationCode
This method uses Exchange method on oauth2 config to get access and refresh token for an authorization code. You should persist your refresh token somewhere, because an authorization code can be used only once.
TokenSourceFromRefreshToken
If you already have a refresh token you can use this method to create a token source for it.
What about all the other models and endpoints?
Scope of this client is limited to models and endpoints I'm using in my project atm. Feel free to create an enhancement issue to request an extension.