Skip to content

Instantly share code, notes, and snippets.

View matthewfitz's full-sized avatar

Matt Fitzgerald matthewfitz

View GitHub Profile
My Personal Credit Card
Number: 4111111111111111
CVV: 111
Expires: You're a dick for looking at this
Status: 200 OK
{
"code": 200,
"message": "User exists"
}
GET https://opensky.com/api/v1/json/users/exist
Status: 400
{
"code": 400,
"message": "Bad Request"
}
GET https://opensky.com/api/v1/json/users/[email protected]
Status: 404
{
"code": 404,
"message": "Not Found"
}
GET https://opensky.com/api/v1/json/users/exist?email=test_test.com
Status: 422
{
"code": 422,
"message": "Please provide valid email address"
}
Status: 202
{
"code": 202,
"message": "Accepted",
"redirect": "http://google.com"
}
POST https://opensky.com/api/v1/json/users
[email protected]
Status: 417
{
"code": 417,
"message": "There is an existing account associated with this email."
}
POST https://opensky.com/api/v1/json/users
email=test_test.com
Status: 422
{
"code": 422,
"message": "Please provide valid email address"
}
<?php
$ch = curl_init("https://opensky.com/api/v1/json/heartbeat");
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_NOBODY, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X_OPENSKY_API_KEY: foobar'));
$head = curl_exec($ch);
<?php
$ch = curl_init("https://opensky.com/api/v1/json/users/[email protected]");
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X_OPENSKY_API_KEY: foobar'));
$head = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);