StravaClient class
A Flutter client for Strava, which supports most of Strava V3 API operations.
This client contains repositories allowing an easy management of the
different operations with Strava's API.
Some usage examples:
// Create the client
StravaClient myStravaClient = StravaClient(
secret: 'my-strava-secret',
clientId: 'my-strava-client-id',
applicationName: 'my-awesome-app',
);
// Authenticate and authorize your app to access your Strava's data
await myStravaClient.authentication.authenticate(
scopes: [
AuthenticationScope.activity_read_all,
],
redirectUrl: 'my.cool.app://redirect',
callBackUrlScheme: 'my.cool.app',
);
// Get some of your activities
var myActivities =
await myStravaClient.activities.listLoggedInAthleteActivities(
DateTime.now(),
DateTime(1999),
1,
30,
);
Constructors
- StravaClient({required String secret, required String clientId, String applicationName = ''})
-
Create a new StravaClient from your
Client IDandClient Secret.
Properties
- activities → RepositoryActivity
-
Repository managing all
activitiesoperations.no setter - athletes → RepositoryAthlete
-
Repository managing all
athletesoperations such as RepositoryAthlete.getAthleteStats or RepositoryAthlete.updateAthlete.no setter - authentication → RepositoryAuthentication
-
Repository managing
authentication.no setter - clientId → String
-
Your Strava
client IDgenerated for your API Application.final - clubs → RepositoryClub
-
Repository managing all
clubsoperations.no setter - gears → RepositoryGear
-
Repository managing all
gearsoperations.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- routes → RepositoryRoute
-
Repository managing all
routesoperations.no setter - runningRaces → RepositoryRunningRace
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secret → String
-
Your Strava
client secretgenerated for your API Application.final - segmentEfforts → RepositorySegmentEffort
-
Repository managing all
segmentEffortsoperations.no setter - segments → RepositorySegment
-
Repository managing all
segmentsoperations.no setter - streams → RepositoryStream
-
Repository managing all
streamsoperations.no setter - uploads → RepositoryUpload
-
Repository managing all
uploadsoperations.no setter
Methods
-
getStravaAuthToken(
) → Future< TokenResponse?> - Returns stored strava TokenResponse if needed. returns null if there is no logged in user
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited