Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandeep Mahapatra sandeepm96

View GitHub Profile
View .travis.yml
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "3.6"
- "3.6-dev" # 3.6 development branch
- "3.7-dev" # 3.7 development branch
View rest_client.py
import requests
headers = {'accept':'application/json'}
response = requests.get('https://api.github.com/users/sandeepm96/repos', headers=headers)
assert response.status_code == 200
for repo in response.json():
print repo['name']
View rest_client.py
import json
import requests
response = requests.post('https://api.github.com/user/repos',
data=json.dumps({'name': 'foo'}), auth=('user', 'pass'))
assert response.status_code == 201
print response.json()
View rest_client.py
import requests
response = requests.get('https://api.github.com/users/sandeepm96/repos')
assert response.status_code == 200
for repo in response.json():
print repo['name']
@sandeepm96
sandeepm96 / GraphSpace.postman_collection.json
Last active Jul 3, 2017
Postman collection for GraphSpace RESTful APIs
View GraphSpace.postman_collection.json
{
"variables": [],
"info": {
"name": "GraphSpace",
"_postman_id": "03a2f47b-b1cc-0d0f-f52c-37b841220016",
"description": "Collection for the GraphSpace REST APIs.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{