// NewStravaAPI returns a StravaAPI ready to make API calls (on behalf of stravaAccessToken)
// with default opts (like after/before dates)
NewStravaAPI returns a StravaAPI ready to make API calls (on behalf of stravaAccessToken)
with default opts (like after/before dates)
// NewStravaAPI returns a StravaAPI ready to make API calls ( on behalf of stravaAccessToken ) // with default opts ( like after / before dates )
func NewStravaAPI(stravaAccessToken string) *StravaAPI {
	thisYear := getThisYear()
	s := &StravaAPI{
		client: swagger.NewAPIClient(swagger.NewConfiguration()),
		ctx:    context.WithValue(context.Background(), swagger.ContextAccessToken, stravaAccessToken),
		opts: &swagger.ActivitiesApiGetLoggedInAthleteActivitiesOpts{
			After:   optional.NewInt32(int32(time.Date(thisYear, 1, 1, 0, 0, 0, 0, time.UTC).Unix())),
			Before:  optional.NewInt32(int32(time.Date(thisYear+1, 1, 1, 0, 0, 0, 0, time.UTC).Unix())),
			Page:    optional.NewInt32(1),
			PerPage: optional.NewInt32(int32(5)),
		},
	}
	return s
}
func NewStravaAPI ( stravaAccessToken string ) * StravaAPI { thisYear := getThisYear ( ) s := & StravaAPI { client : swagger . NewAPIClient ( swagger . NewConfiguration ( ) ) , ctx : context . WithValue ( context . Background ( ) , swagger . ContextAccessToken , stravaAccessToken ) , opts : & swagger . ActivitiesApiGetLoggedInAthleteActivitiesOpts { After : optional . NewInt32 ( int32 ( time . Date ( thisYear , 1 , 1 , 0 , 0 , 0 , 0 , time . UTC ) . Unix ( ) ) ) , Before : optional . NewInt32 ( int32 ( time . Date ( thisYear + 1 , 1 , 1 , 0 , 0 , 0 , 0 , time . UTC ) . Unix ( ) ) ) , Page : optional . NewInt32 ( 1 ) , PerPage : optional . NewInt32 ( int32 ( 5 ) ) , } , } return s }
NewStravaAPI returns a StravaAPI ready to make API calls (on behalf of stravaAccessToken)
with default opts (like after/before dates)
NewStravaAPI returns a StravaAPI ready to make API calls ( on behalf of stravaAccessToken ) with default opts ( like after / before dates )