Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-leinz committed Aug 23, 2024
1 parent 55fe717 commit 4a843b0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
```

### Creating Resources

In addition to fetching resources, the API can also be used to create resources
for example a task request can be constructed with the following:

```rust, no_run
use freedom_api::prelude::*;
use freedom_config::{Config, Test};
use time::OffsetDateTime
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let atlas_client = Client::from_env()?;
let response = atlas_client.new_task_request()
.test_task("my_test_file.bin")
.target_time_utc(OffsetDateTime::now_utc() + Duration::from_secs(15 * 60))
.task_duration(120)
.satellite_id(1)
.site_id(2)
.site_configuration_id(3)
.band_ids([4, 5, 6])
.send()
.await?;
Ok(())
}
```

## Documentation

The freedom API has a significant amount of documentation to get users up and
Expand Down

0 comments on commit 4a843b0

Please sign in to comment.