Skip to content

Instantly share code, notes, and snippets.

@jaxbot
Created September 20, 2014 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaxbot/777fcda50719651067c0 to your computer and use it in GitHub Desktop.
Save jaxbot/777fcda50719651067c0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Log in to Carwings web interface
curl --data "j_username=$LEAF_USERNAME&j_passwordHolder=Password&j_password=$LEAF_PASSWORD" -c cookiejar.tmp https://www.nissanusa.com/owners/j_spring_security_check
# Request a status update
curl -b cookiejar.tmp https://www.nissanusa.com/owners/vehicles/statusRefresh?id=$LEAF_CARID
# Download status JSON (sync, blocking)
curl -b cookiejar.tmp https://www.nissanusa.com/owners/vehicles/pollStatusRefresh?id=$LEAF_CARID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment