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 cc74cdd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
```

### Creating Resources

In addition to fetching resourced, 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()?;
// Create a new task request.
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 cc74cdd

Please sign in to comment.