Created
November 22, 2013 00:21
-
-
Save BlaShadow/7592444 to your computer and use it in GitHub Desktop.
This file contains 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': 'mail@mail.com','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': 'mail@mail.com','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': 'mail@mail.com','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': 'roqwmero@mail.com','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/mail@mail.com' | |
data = {'token': 'd8578edf8458ce06fbc5bb76a58c5ca4','email': 'romero@mail.com','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': 'romero@mail.com','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': 'romero@mail.com','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': 'romero@mail.com','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': 'romero@mail.com','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': 'romero@mail.com','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