Skip to content

Instantly share code, notes, and snippets.

View sandeepm96's full-sized avatar

Sandeep Mahapatra sandeepm96

View GitHub Profile
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
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']
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()
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 July 3, 2017 22:32
Postman collection for GraphSpace RESTful APIs
{
"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": [
{