Advertisement
Guest User

Boxcar Python function

a guest
Jan 19th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. def send_boxcar(titolo, filename, server, channel, bot, file_size):
  2.     message= "<b>Filename: </b>"+str(filename)+"<br>"+"<b>File size: </b>"+str(file_size)+" MB<br>"+"<b>Server: </b>"+str(server)+"<br>"+"<b>Channel: </b>"+str(channel)+"<br>"+"<b>Bot: </b>"+str(bot)
  3.     access_token = 'API_KEY'
  4.  
  5.     address = 'https://new.boxcar.io/api/notifications'
  6.     data = {'user_credentials': access_token, 'notification[title]': titolo, 'notification[long_message]': message, 'notification[sound]': 'up'}
  7.     r = requests.post(address, data=data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement