Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datastreamapp/datastreamsh
DataSteam API helper in Shell
https://github.com/datastreamapp/datastreamsh
Last synced: 9 days ago
JSON representation
DataSteam API helper in Shell
- Host: GitHub
- URL: https://github.com/datastreamapp/datastreamsh
- Owner: datastreamapp
- License: mit
- Created: 2023-03-03T04:17:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T21:15:13.000Z (11 days ago)
- Last Synced: 2025-01-02T22:22:41.799Z (11 days ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DataStream.sh
DataStream.org API helper. See API documentation for query string values and structure.## Install (MacOS)
```bash
curl -o /usr/local/bin/datastreamsh https://raw.githubusercontent.com/datastreamapp/datastreamsh/main/datastream.sh
chmod +x /usr/local/bin/datastreamsh
```## Use
This package has been tested on MacOS.
```
datastreamsh command [options...]
```### Commands
- `setup`: Prompts for API key, will be save to `~/.datastream` in plain text. Not setting up will prompt for `x-api-key` on ever command.
- `metadata`: Wraps /v1/odata/v4/Metadata API endpoint
- `locations`: Wraps /v1/odata/v4/Locations API endpoint
- `observations`: Wraps /v1/odata/v4/Observations API endpoint
- `records`: Wraps /v1/odata/v4/Records API endpoint### Options
- `--select`: What parameters to be returned
- `--filter`: What you want to , in OData format
- `--format`: Print output in alternative format (Allowed: `JSONSTREAM`, `CSV`; Default: `JSONSTREAM`)
- `--top`: Number of results to return per request (Default: 10000)
- `--domain`: Use to point at testing environments### Example: Setup
```bash
# datastreamsh setup
$ datastreamsh setup
x-api-key: # copy and paste API key here and press enter
```### Example: Basic
```bash
# datastreamsh command [options...]
$ datastreamsh locations --select "..." --filter "..."
```### Example: save as CSV to file
```bash
# datastreamsh command --format CSV --select [options...]
$ datastreamsh records --format CSV --select "..." --filter "..." > file.csv
```