Created
November 22, 2013 00:21
-
-
Save BlaShadow/7592444 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
def login(): | |
url = 'http://localhost/Service/service.svc/loginenduser/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','password': '123456'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def deleteSubcription(): | |
url = 'http://localhost/Service/service.svc/deletesubcription/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','company': '123'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
print "Termino" | |
def addSub(): | |
url = 'http://localhost/Service/service.svc/addsubcription/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','company': '7'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def signUp(): | |
url = 'http://localhost/Service/service.svc/signupuser/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','password': 'qwerty'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def getSub(): | |
url = 'http://localhost/Service/service.svc/getSubcription/d8578edf8458ce06fbc5bb76a58c5ca4/[email protected]' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','password': 'qwerty'} | |
headers = {'content-type': 'application/json'} | |
r = requests.get(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def view(): | |
url = 'http://localhost/Service/service.svc/viewevent/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','id': '6'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def plus(): | |
url = 'http://localhost/Service/service.svc/plusevent/' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','id': '6'} | |
headers = {'content-type': 'application/json'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def hits(): | |
url = 'http://localhost/Service/service.svc/gethits/d8578edf8458ce06fbc5bb76a58c5ca4/2012-12-10/09-20' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','id': '6'} | |
headers = {'content-type': 'application/json'} | |
r = requests.get(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def company(): | |
url = 'http://localhost/Service/service.svc/getcompany/d8578edf8458ce06fbc5bb76a58c5ca4/1' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','id': '1'} | |
headers = {'content-type': 'application/json'} | |
r = requests.get(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
def events(): | |
url = 'http://localhost/Service/service.svc/getevents/d8578edf8458ce06fbc5bb76a58c5ca4/2000-12-12/12-12' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': '[email protected]','id': '1'} | |
headers = {'content-type': 'application/json'} | |
r = requests.get(url, data=json.dumps(data), headers=headers) | |
print r | |
print r.content | |
print r.text | |
signUp() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment