-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use anyhow::Result; | ||
use chrono::Local; | ||
use url::Url; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let url = Url::parse("https://www.emfcamp.org/schedule/2022.json")?; | ||
|
||
let client = emfcamp_schedule_api::Client::new(url); | ||
|
||
let schedule = client.get_schedule().await?; | ||
|
||
let now = Local::now(); | ||
let now_and_next = schedule.now_and_next(now.into()); | ||
|
||
println!("{:#?}", now_and_next); | ||
|
||
Ok(()) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use anyhow::Result; | ||
use url::Url; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let url = Url::parse("https://www.emfcamp.org/schedule/2022.json")?; | ||
|
||
let client = emfcamp_schedule_api::Client::new(url); | ||
|
||
let schedule = client.get_schedule().await?; | ||
|
||
println!("Found {} events", schedule.events.len()); | ||
for event in schedule.events { | ||
println!("- {:?}", event); | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use anyhow::Result; | ||
use url::Url; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<()> { | ||
let url = Url::parse("https://www.emfcamp.org/schedule/2022.json")?; | ||
|
||
let client = emfcamp_schedule_api::Client::new(url); | ||
|
||
let schedule = client.get_schedule().await?; | ||
|
||
let venues = schedule.venues(); | ||
|
||
println!("Found {} venues:", venues.len()); | ||
for venue in venues { | ||
println!("- {}", venue); | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains 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