-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomo_listar_pacotes.py
More file actions
27 lines (23 loc) · 1.24 KB
/
como_listar_pacotes.py
File metadata and controls
27 lines (23 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- encoding: utf-8 -*-
import requests
if __name__ == "__main__":
host = "www.muambator.com.br"
api_token = "insira-seu-token-aqui"
r = requests.get('http://%s/api/clientes/v1/pacotes/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text
r = requests.get('http://%s/api/clientes/v1/pacotes/pendentes/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text
r = requests.get('http://%s/api/clientes/v1/pacotes/entregues/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text
r = requests.get('http://%s/api/clientes/v1/pacotes/tributados/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text
r = requests.get('http://%s/api/clientes/v1/pacotes/atrasados/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text
r = requests.get('http://%s/api/clientes/v1/pacotes/arquivados/?api-token=%s' % (host, api_token), headers={"Content-type": "application/json"})
print r.status_code
print r.text