Skip to content

Instantly share code, notes, and snippets.

View boomtrain-support's full-sized avatar

Boomtrain Support boomtrain-support

View GitHub Profile
@boomtrain-support
boomtrain-support / get-person-email-jquery.html
Created September 1, 2015 00:30
GET /person - Retrieve a User by email using jQuery
<script>
// Retrieve a User by email
function getPersonEmail() {
// Send a jQuery AJAX request to retrieve the User
$.ajax({
url: 'https://api.boomtrain.com/person?email={email}',
// Replace with your Username, Password, and App Id
headers: {
'x-app-id': '{app_id}',
'Content-Type': 'application/json',
@boomtrain-support
boomtrain-support / get-person-bsin-curl
Created September 1, 2015 00:28
GET /person - Retrieve a User by their BSIN using cURL
curl -u {username}:{password}
-H 'x-app-id: {app_id}'
'https://api.boomtrain.com/person?bsin={bsin}'
@boomtrain-support
boomtrain-support / get-person-email-curl
Last active September 1, 2015 00:29
GET /person - Retrieve a User by email using cURL
curl -u {username}:{password}
-H 'x-app-id: {app_id}'
'https://api.boomtrain.com/person?email={email}'
@boomtrain-support
boomtrain-support / delete-resources-model-id-jquery.html
Created September 1, 2015 00:18
DELETE /resources/:model/:id - Delete an existing Resource with the specified model type by ID using jQuery
<script>
// Delete a resource for the model by ID
function deleteResourcesModelId() {
// Send a jQuery AJAX request to delete the resource
$.ajax({
url: 'https://api.boomtrain.com/resources/{model}/{id}',
// Replace with your Username, Password, and App Id
headers: {
'x-app-id': '{app_id}',
'Content-Type': 'application/json',
@boomtrain-support
boomtrain-support / delete-resources-model-id-jquery.html
Created September 1, 2015 00:18
DELETE /resources/:model/:id - Delete an existing Resource with the specified model type by ID using jQuery
<script>
// Delete a resource for the model by ID
function deleteResourcesModelId() {
// Send a jQuery AJAX request to delete the resource
$.ajax({
url: 'https://api.boomtrain.com/resources/{model}/{id}',
// Replace with your Username, Password, and App Id
headers: {
'x-app-id': '{app_id}',
'Content-Type': 'application/json',
@boomtrain-support
boomtrain-support / delete-resources-model-id-curl
Created September 1, 2015 00:16
DELETE /resources/:model/:id - Delete an existing Resource with the specified model type by ID using cURL
curl -u {username}:{password}
-H 'x-app-id: {app_id}'
-X DELETE
'https://api.boomtrain.com/resources/{model}/{id}'
@boomtrain-support
boomtrain-support / put-resources-model-id-response.js
Created August 31, 2015 23:45
PUT /resources/:model/:id - Response details after creating the Resource by model type by ID
{
id: "{Resource ID}",
model: "{Model Type}",
props: {
url: "{The Canonical URL}",
thumbnail: "{URL to the Hosted Image File}",
title: "{Title of the Resource}",
...
},
updatedAt: "{ISO Formatted Timestamp}"
@boomtrain-support
boomtrain-support / put-resources-model-id-jquery.html
Created August 31, 2015 23:44
PUT /resources/:model/:id - Update an existing Resource with the specified model type by ID using jQuery
<script>
// Update an existing resource for the model by id
function putResourcesModelId() {
// JSON stringify the resource data
var json_model = JSON.stringify({
'props': {
'title': '{Your New Title}',
'thumbnail': '{URL to the Hosted Image}',
...
}
@boomtrain-support
boomtrain-support / put-resources-model-id-curl
Created August 31, 2015 23:02
PUT /resources/:model/:id - Update an existing Resource with the specified model type and ID using cURL
curl -u {username}:{password}
-H 'x-app-id: {app_id}'
-X PUT
-H 'Content-Type: application-json'
-d '{
"title": "{The Title of the Resource}",
"thumbnail": "{URL of the Hosted Image}",
...
}'
'https://api.boomtrain.com/resources/{model}/{id}'
@boomtrain-support
boomtrain-support / post-resources-model-response.js
Last active August 31, 2015 23:10
POST /resources/:model/ - Response details after creating the Resource by model type
{
id: "{Resource ID}",
model: "{Model Type}",
props: {
url: "{The Canonical URL}",
thumbnail: "{URL to the Hosted Image File}",
title: "{Title of the Resource}",
...
},
updatedAt: "{ISO Formatted Timestamp}"