Instantly share code, notes, and snippets.
Save this to a .sh file, and don't forget to make it executable using the command chmod +x pushMe.sh.
chmod +x pushMe.sh
Then you execute it by writing ./pushMe.sh Hello!
Hello there, thanks for the cool service! I have a question: should parameter be "token" or "identifier", as mentioned in the iOS app? I managed to send notifications before but now I can't see pushes on device with either parameter name.
Ah, never mind, both do work. I just had to change the script to make it work on macOS Sierra:
curl -d "title=$message&token=my_token" -X POST https://pushmeapi.jagcesar.se
I think this gist should be updated to:
curl "title=$message&identifier=my_token" https://pushmeapi.jagcesar.se