Pushbullet / 11.06.14

A Pushbullet Library for Nim

I've just pushed out a very simple library for Nimrod which is based on the Pushbullet HTTP API. It's quite simple to work with, and also doubles as a nice basic command line application.


Build the app with the following command

nim c pushbullet

Example usage (from code)

Using the API is pretty straight forward. Once you've cloned the pushbullet.nim file, you can install it with

nimble install

then import the module into the top of your nim file

import pushbullet, json, asyncdispatch

# Set the API key (get yours here: https://www.pushbullet.com/account)

# Get all data from 'users/me'
echo (await pushbullet.me()).pretty()

# List all devices
for device in (await pushbullet.devices()):
	echo device.pretty()

# Push!
let args = PushRequest(
	kind: Link,
	url: "http://myurl.com",
	title: "My URL!")

await pushbullet.push(args)

Get notified when your long-running tasks are completed

I know I often step away from my computer when I'm waiting for it to complete a long-running task, with this app I can now add a quick pushbullet command to have my computer buzz my phone as soon as the task is complete!

sleep 10; pushbullet "all done!"

Clone it on Github