Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mranv/ocsf-rust-crawler

This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.
https://github.com/mranv/ocsf-rust-crawler

api ocsf ocsf-server rust-lang

Last synced: 4 days ago
JSON representation

This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.

Awesome Lists containing this project

README

        

# OCSF Rust Crawler

This Rust application fetches JSON data from a specified URL ( The url is taken after running the OCSF Schema Server docker image. ) and saves it to a file every second.

## Usage

1. Clone the repository
```
git clone https://github.com/mranv/ocsf-rust-crawler
```

2. Build the application
```
cargo build
```

3. Run the application
```
cargo run
```

## Configuration

The following parameters can be configured in `main.rs`:

- `url` - URL to fetch JSON data from
- `duration` - Total runtime of the application
- `interval` - Interval (in seconds) between fetches

## Output

- Fetched JSON data is saved to a file named `ocsf_schema_sample_data.json`
- Status and errors are printed to stdout

## Dependencies

- reqwest
- serde
- serde_json
- chrono

## License

This project is licensed under the MIT License. See [LICENSE](LICENSE) file for details.