This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let health_route = warp::path!("health").and_then(health_handler); | |
| warp::serve( | |
| started_tracking_route | |
| .or(stopped_tracking_route) | |
| .or(health_route), | |
| ) | |
| .run(([0, 0, 0, 0], 8000)) | |
| .await; | |
| Ok(()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUBLIC_URL=the-url-from-localtunnel TMLR_API_KEY=secret TMLR_API_SECRET=secret cargo run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tracking was started with data: TrackingStartedPayload { user_id: "1234", event_type: "trackingStarted", data: TrackingStartedData { current_tracking: Tracking { id: 1234, activity: Activity { id: "1234", name: "Misc", color: "#17bbd2", integration: "zei", space_id: "1234", device_side: None }, started_at: "2020-11-30T07:08:52.203", note: Note { text: None, tags: [], mentions: [] } } } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| time entry was created with data: TrackingStoppedPayload { user_id: "1234", event_type: "trackingStopped", data: TrackingStoppedData { new_time_entry: Some(TimeEntry { id: "1234", activity: Activity { id: "1234", name: "Misc", color: "#17bbd2", integration: "zei", space_id: "1234", device_side: None }, duration: Duration { started_at: "2020-11-30T07:08:52.203", stopped_at: "2020-11-30T08:08:59.789" }, note: Note { text: None, tags: [], mentions: [] } }) } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[derive(Deserialize, Debug)] | |
| struct SubscriptionsResponse { | |
| subscriptions: Vec<Subscription>, | |
| } | |
| #[derive(Deserialize, Debug)] | |
| struct Subscription { | |
| id: String, | |
| event: String, | |
| target_url: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| println!("listing subscriptions..."); | |
| let subscriptions = list_subscriptions(&token).await?; | |
| println!("subscriptions: {:?}", subscriptions); |
OlderNewer