예제 #1
0
def points():
	request.post({
	    url: "https://engine.apikik.com/api/v1/message",
	    auth: {
	        user: "******",
	        pass: "******"
	    },
	    json: {
	    	"messages":[{
	    		"to":message['from'],
	    		"type":"link",
	    		"url":"https://points.kik.com"
	    		"data":{
	    			"transaction":{
				      "id":random_gen.randomgen(),
				      "sku":"KikPointsforSMS"
				      "points":10,
				      #"url":"points.kik.com",
				      #"callback_url":"https://sms-chat-bot.herokuapp.com/kikpoints",
				      #"data":{
				       #   //Any other arbitrary data you may need
				      #}
				   }
	    		},
	    		"noForward":true
	    		}]
	    }
	}, callback);
	return
예제 #2
0
def chargePoints(username):
    userID = random_gen.randomgen()
    requests.post(
        'https://engine.apikik.com/api/v1/message',
        auth=('smsbot', '<Redacted>'),
        headers={'Content-Type': 'application/json'},
        data=
        '{"messages":[{"to":"%s","type":"link","url" :"https://points.kik.com/", "text" : "Click me to use your Kik Points",  "noForward" : true , "attribution": {"name": "Kik Points", "iconUrl": "http://offer-service.appspot.com/static/kp-icon.50.jpg"} , "kikJsData" : {"transaction" : {"id" : "%s", "points" : 10, "sku" : "com.kp.forSms", "url" : "https://sms-chat-bot.herokuapp.com/kikpoints", "callback_url" : "https://sms-chat-bot.herokuapp.com/kikpoints"} }}]}'
        % (username, userID))
    database.setID(username, userID)
    return
예제 #3
0
파일: bot.py 프로젝트: S0Ndustries/sms-bot
def chargePoints(username):
    userID = random_gen.randomgen()
    requests.post(
    'https://engine.apikik.com/api/v1/message',
    auth=('smsbot', '6fe6f6dd-7970-4033-ae59-07bbd2f5d1cc'),
    headers={
        'Content-Type': 'application/json'
    },
    data= '{"messages":[{"to":"%s","type":"link","url" :"https://points.kik.com/", "text" : "Click me to use your Kik Points",  "noForward" : true , "attribution": {"name": "Kik Points", "iconUrl": "http://offer-service.appspot.com/static/kp-icon.50.jpg"} , "kikJsData" : {"transaction" : {"id" : "%s", "points" : 10, "sku" : "com.kp.forSms", "url" : "https://sms-chat-bot.herokuapp.com/kikpoints", "callback_url" : "https://sms-chat-bot.herokuapp.com/kikpoints"} }}]}' % (username, userID)
    )  
    database.setID(username,userID)
    return