A Twitter bot for tracking a package with UPS. Make an account here: https://www.ups.com/upsdeveloperkit
Install node 6 or higher, then run
npm install
All configuration takes place in config.js
and a JSON file.
- Add your packages to a JSON file. An example can be found in
sample.packages.json
- This file is used as a cache during operation. The bot will write additional data about each package as the location changes.
- New packages may be added without stopping the bot.
- Any package with the
delivered
set totrue
can be removed as it will no longer be Tweeted.
- Add your Twitter consumer and access token keys and secrets to the
twitter
object - Add your UPS
licenseNumber
,userId
, andpassword
to theups
object - Edit the minor options as you desire
packagesFileName = 'packages.json'
the filename where you store your packagesrefreshTime = 3600000
refresh time in millisecondshashtag = '#packageBot'
optional hashtag to be appended to a tweet. Set it to be an empty string if you don't want a hashtagtitle = 'My'
The ownership title of the package. This prefixes the package name. If you run this bot on its own account, it might make sense to say, for example, 'Brian's magic eraser has arrived...', where if you're running the bot on your own account, it might make more sense to use the first person, for example, 'My magic eraser has arrived...'
npm start
Build the container with:
docker build -t packagebot .
Run the container with:
docker run --name packageBot -d packagebot