v0.0.0-...-9f043da Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 20 Imported by: 0



Binary report-data-usage-server sends info to your SIM about how much data has been used.

The server is primarily designed to respond to incoming webhooks from Twilio. Make a POST request to the server and specify a Command parameter and a "SimSid" parameter. The only supported Command is "Usage". The SimSid should be a sim for your account.

The server will send a Command to your phone using the Commands API. If successful, the server will respond with a 204.

Example report format:

$ report-data-usage
iPhone v13
2017-06-19: 0
2017-06-20: 0
2017-06-21: 11.281MB
2017-06-22: 93.341MB
2017-06-23: 94.422MB
2017-06-24: 159.461MB
2017-06-25: 50.062MB
total (last 7 days): 408.568MB

Your Twilio credentials are loaded from the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables. There are several flags:

--days int
    Change the number of days to report usage for (default 7)
--location string
    Use a different timezone for day boundaries (example "America/Los_Angeles")
--sim string
    Only fetch usage for this sim
--dry-run bool
    Dry run mode (don't send commands back to the device)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL