Skip to content

Instantly share code, notes, and snippets.

View caseysoftware's full-sized avatar

Danger Casey caseysoftware

View GitHub Profile
@caseysoftware
caseysoftware / get-captions.sh
Last active January 2, 2016 07:06
This is how to request an insight (in this case, captions). This is used in the closed captioning post.
curl https://api.clarify.io/v1/bundles/abcde12345/insights/fadbe23456 \
--header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / order-captions.sh
Last active January 2, 2016 07:06
This is how to order closed captioning for a given bundle. This is used in the closed captioning post.
curl --data "insight=captions_r9" https://api.clarify.io/v1/bundles/abcde12345/insights \
--header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / load.sh
Last active January 2, 2016 07:07
This is how to load a file into Clarify.io. This is used in the closed captioning post.
curl --data "media_url=http://media.clarify.io/video/presentations/SirKenRobinson-TED2006-How-Schools-Kill-Creativity.mp4" \
--data "name=Sir Ken Robinson – TED 2006" https://api.clarify.io/v1/bundles \
--X POST --header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / keywords.json
Created December 16, 2015 02:55
Sample JSON payload for keywords
{
"bundle_id": "abcde12345",
"created": "2015-05-16T20:39:37.507Z",
"id": "54321edcba",
"name": "spoken_keywords",
"status": "ready",
"track_data": [
{
"keywords": [
{
@caseysoftware
caseysoftware / keywords.sh
Last active December 16, 2015 02:54
Makes a request to get the keywords
curl https://api.clarify.io/v1/bundles/abcde12345/insights/54321edcba \
--header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json
@caseysoftware
caseysoftware / bundle_callback.json
Created December 16, 2015 02:49
The resulting callback from creating a bundle
{
"id":"abcde12345",
"_class":"Ref",
"_links":{
"self":{
"href":"/v1/bundles/abcde12345"
},
"curies":[
{
"href":"/docs/rels/{rel}",
@caseysoftware
caseysoftware / load.sh
Created December 16, 2015 02:48
Using curl to load a media file
curl --data "media_url=http://media.clarify.io/audio/books/dorothyandthewizardinoz_01_baum_64kb.mp3" \
--data "notify_url=http://example.org/sample-receiver" \
--data "name=Dorothy and the Wizard of Oz" https://api.clarify.io/v1/bundles \
--X POST --header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json
@caseysoftware
caseysoftware / multi-lang.sh
Created December 16, 2015 02:44
Sample code to perform a language-based search
curl https://api.clarify.io/v1/search?query=compris \
--data "language=fr" \
--header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / classification.json
Created December 16, 2015 02:41
A sample classification payload
{
"_class": "ClassificationInsight",
"bundle_id": "abcde12345",
"created": "2015-09-17T18:48:48.058Z",
"id": "edcba56789",
"name": "classification",
"status": "ready",
"updated": "2015-09-17T18:48:48.061Z",
"_links": {
"clarify:bundle": {
@caseysoftware
caseysoftware / classification.sh
Created December 16, 2015 02:39
Makes a request to get the classification
curl https://api.clarify.io/v1/bundles/abcde12345/insights/edcba56789 \
--header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json