strava_wrapper/api.rs
1use crate::endpoints::{ActivitiesEndpoint};
2
3#[derive(Clone)]
4pub struct StravaAPI {
5 url: String,
6 token: String,
7}
8
9impl StravaAPI {
10 pub fn new(url: &str, token: impl Into<String>) -> Self {
11 Self {
12 url: url.into(),
13 token: token.into(),
14 }
15 }
16
17 pub fn activities(&self) -> ActivitiesEndpoint {
18 // create
19 // get X
20 // update
21 // list comments: X
22 // list kudos:
23 // list laps:
24 // list zones:
25 //
26 ActivitiesEndpoint::new(self.url.clone(), self.token.clone())
27 }
28
29 pub fn athletes(&self) -> () {
30 // get (current athlete)
31 // zones
32 // stats
33 // update
34 todo!();
35 }
36
37 pub fn clubs(&self) -> () {
38 // activities
39 // admins
40 // get
41 // list members
42 // list athlete's clubs
43 todo!();
44 }
45
46 pub fn gear(&self) -> () {
47 // get
48 todo!();
49 }
50
51 pub fn routes(&self) -> () {
52 // export GPX
53 // export TCX
54 // get
55 // list athlete's routes
56 todo!();
57 }
58
59 pub fn segments(&self) -> () {
60 // explore
61 // list starred
62 // get
63 // star
64 todo!();
65 // goes to SegmentEfforts
66 }
67}