Skip to content

tekkamanendless/emergencyreporting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emergency Reporting

Client for the Emergency Reporting API.

Go Report Card GoDoc

This is basically an Emergency Reporting client package that also comes with a command line tool.

I have implemented the subsets of the API that I currently use, but there are many more endpoints that I haven't even looked at yet.

Using the CLI

Create a JSON file with your login and app information:

{
	"username": "YOUR USERNAME",
	"password": "YOUR PASSWORD",
	"account_id": "ER ACCOUNT ID",
	"user_id": "ER USER ID",
	"client_id": "YOUR CLIENT ID/APP NAME",
	"client_secret": "YOUR CLIENT SECRET",
	"subscription_key": "YOUR SUBSCRIPTION KEY"
}

Then run:

emergencyreporting -config /path/to/config.json ...

Examples

Get a token:

emergencyreporting -config /path/to/config.json login

Raw operation to get the current user:

emergencyreporting -config /path/to/config.json raw get https://data.emergencyreporting.com/agencyusers/v2/users/me

Advanced Usage

The JSON configuration file supports the following additional fields:

  • tenant_host; the TENANT_HOST value for authentication (default: login.emergencyreporting.com).
  • tenant_segment; the TENANT_SEGMENT value for authentication (default: login.emergencyreporting.com).
  • host; the host to use for API endpoints (default: https://data.emergencyreporting.com).

About

A Golang client for the Emergency Reporting API.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages