This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Create a new Resource of the specified model type | |
function postResourcesModel() { | |
// JSON stringify the data | |
var json_data = JSON.stringify({ | |
'id': '{Resource ID}', | |
'props': { | |
'url': '{The Canonical URL}', | |
'title': '{The Title of the Resource}', | |
'thumbnail': '{URL to the Hosted Image}', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -u {username}:{password} | |
-H 'x-app-id: {app_id}' | |
-X POST | |
-H 'Content-Type: application-json' | |
-d '{ | |
"id": "{Resource ID}", | |
"props": { | |
"url": "{The Canonical URL}", | |
"title": "{The Title of the Resource}", | |
"thumbnail": "{URL of the Hosted Image}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
id: "{Specified ID}", | |
model: "{Model}", | |
props: { | |
author: "{Author}", | |
body: "{Body of the Resource}", | |
categories: { | |
"{Category 1}", | |
"{Category 2}" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Get the Resource by model type and ID | |
function getResourcesModelId() { | |
// Send a jQuery AJAX request to retrieve the Resource | |
$.ajax({ | |
url: 'https://api.boomtrain.com/resources/{model}/{id}', | |
// Replace with your App Id | |
headers: {'x-app-id': '{app_id}'}, | |
type: 'GET', | |
success: function(msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl | |
-H 'x-app-id: {app_id}' | |
-X GET | |
'https://api.boomtrain.com/resources/{model}/{id}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
0: { | |
createdAt: "{ISO Formatted Date the Resource was Ingested}", | |
debug: "{A JSON array of items used by Boomtrain}", | |
props: "{A JSON array of the Resource Properties based on Your meta Tags}", | |
updatedAt: "{ISO Formatted Date the Resource was Last Reingested}" | |
}, | |
1: { | |
createdAt: "{ISO Formatted Date the Resource was Ingested}", | |
debug: "{A JSON array of items used by Boomtrain}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Request all Resources by model type | |
function getResourcesModel() { | |
// Send a jQuery AJAX request to retrieve the Resources by model type | |
$.ajax({ | |
url: 'https://api.boomtrain.com/resources/{model}', | |
// Replace with your App Id | |
headers: {'x-app-id': '{app_id}'}, | |
type: 'GET', | |
success: function(msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl | |
-H 'x-app-id: {app_id}' | |
-X GET | |
'https://api.boomtrain.com/resources/{model}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"{Model Type 1}", | |
"{Model Type 2}", | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Get the model types for Resources | |
function getResources() { | |
// Send a jQuery AJAX request to retrieve the model types | |
$.ajax({ | |
url: 'https://api.boomtrain.com/resources', | |
// Replace with your App Id | |
headers: {'x-app-id': '{app_id}'}, | |
type: 'GET', | |
success: function(msg) { |