Viewing All Sermons for an Account
When requesting a list of sermons, the following filters can be added to the request as query parameters. Filters can be combined and multiple items can be added by using comma seperated lists. If your combination of filters returns no results a 404 response will be returned.
| Filter | How to use | Description |
|---|---|---|
| series | /sermons?filters[series]=crazy-joy |
You can filter by any of the series that a sermon is associated with |
| speakers | /sermons?filters[speakers]=frank-de-monk |
You can filter by any of the speakers that a sermon is associated with |
| passages | /sermons?filters[passages]=proverbs,1-john |
You can filter by any of the passages that a sermon is associated with |
| categories | /sermons?filters[categories]=family |
You can filter by any of the categories that a sermon is associated with |
| howmany | /sermons?howmany=3 |
You can limit the number of sermons returned with the request. If no limit is included in the request, 12 sermons will be included in the response. |
| page | /sermons?page=2 |
Go to a specific page within the paginated response. |
A note on pagination
While the JSON response will include some url specific keys, please note that the query parameters are not going to include any of the filtering parameters that you may have included in your initial request. Also note that the urls are relative to the end of the /sermons endpoint and not relative to the domain root.
{
"first_page_url": "/?howmany=2&page=1",
"last_page_url": "/?howmany=2&page=6",
"next_page_url": "/?howmany=2&page=4",
"path": "/",
"prev_page_url": "/?howmany=2&page=3"
}
Our recommendation is to utilize the other pagination related keys in the response
{
"current_page": 1,
"last_page": 6,
"from": 7,
"to": 8,
"per_page": 2,
"total": 12
}
$templateUrl = "https://api.sermoncloud.com/{account-sermon-cloud-slug}/sermons";
$url = "https://api.sermoncloud.com/mk040/sermons?page=1&filters[series]=crazy-joy,a-vision-for-the-church&filters[speakers]=bob-smith&filters[passages]=1-timothy&filters[categories]=hope&howmany=2";
$response = Requests::get($url, array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
));
The JSON response looks like the following
{
"current_page": 1,
"data": [
{
"id": "1641205",
"title": "Women of God",
"slug": "women-of-god",
"detail_url": "https://api.sermoncloud.com/mk040/sermons/women-of-god",
"date": {
"carbon": "2019-06-06T07:00:00.000000Z",
"date": "Jun 6, 2019"
},
"preacher": "Andi Lara",
"summary": "Any group that desires to accomplish anything of value must have leaders.",
"text": "<p class=\"summary\">Any group that desires to accomplish anything of value must have leaders. Leadership is a beautiful and godly thing if done right. The churches in Crete needed godly leaders. If led well those churches would produce quality Christian Workers, workers who could model their lives after their godly leaders. Our passage lays out the qualifications of such leaders and workers.</p>",
"interactive_note": {
"note": "<h2>What is Lorem Ipsum?</h2>\r\n<p><strong>Lorem <input data-lpignore='true' style='width:3.5em;' name='single-line[]' class='blank form-control single-line' data-answer='Ipsum' type='text'> </strong> is simply dummy text of the printing and <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='typesetting' type='text'> industry. Lorem Ipsum has been the industry's standard <input data-lpignore='true' style='width:3.5em;' name='single-line[]' class='blank form-control single-line' data-answer='dummy' type='text'> text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Free Form Note Space' placeholder='Free Form Note Space'></textarea></div>\r\n<p>It has survived not only five centuries, but also the leap into electronic <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='typesetting' type='text'> , remaining <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='essentially' type='text'> unchanged. It was <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='popularised' type='text'> in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Add Your Own Notes Here' placeholder='Add Your Own Notes Here'></textarea></div>\r\n<p> </p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Free Form Note Space' placeholder='Free Form Note Space'></textarea></div>",
"css": "<style id='notes-css'>#notes .pnoteText {\n display: block;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 0 0 0 2em;\n border: 0;\n resize: none;\n outline: none;\n font-family: inherit;\n font-size: 1em;\n font-weight: inherit;\n box-shadow: none;\n color: blue;\n}\n\n#notes .blank {\n padding: 0;\n margin: 0;\n border: 0;\n border-bottom: 1px solid #000;\n border-radius: 0;\n background-color: transparent;\n outline: none;\n text-align: center;\n font-family: inherit;\n font-size: 1em;\n font-weight: 700;\n color: #c90;\n}\n\n#notes .blank:focus-within {\n box-shadow: none;\n}\n\n#notes .blank.correct-answer {\n border-color: #090;\n color: #090;\n}\n\n#notes .blank.wrong-answer {\n border-color: #f00;\n color: #f00;\n}\n</style>",
"js": "<script>(function($) {\n $(function() {\n function isCorrect(input) {\n var testAnswer = $.trim(input.val().toLowerCase()).replace(\n /[\\.'\"’,-\\/#!$%\\^&\\*;:{}=\\-_`~()]/g,\n \"\"\n );\n var realAnswer = input\n .attr(\"data-answer\")\n .toLowerCase()\n .replace(/[\\.'\"’,-\\/#!$%\\^&\\*;:{}=\\-_`~()]/g, \"\");\n return testAnswer == realAnswer;\n }\n\n function supportsLocalStorage() {\n return (\n !!window.localStorage &&\n typeof localStorage.getItem === \"function\" &&\n typeof localStorage.setItem === \"function\" &&\n typeof localStorage.removeItem === \"function\"\n );\n }\n\n function saveToLocalStorage() {\n var notesData = { blank: [], pnote: [] };\n $(\"input.blank\").each(function(i) {\n notesData.blank[i] = $(this).val();\n });\n $(\"textarea.pnoteText\").each(function(i) {\n notesData.pnote[i] = $(this).val();\n });\n localStorage.setItem(\"notesSlug\", JSON.stringify(notesData));\n }\n\n function saveAsPdf() {\n var notes_text = $(\"form#notes\").clone()[0];\n\n $(notes_text)\n .find(\".blank\")\n .each(function() {\n answer = $(this).val();\n $(this).replaceWith(\"<strong>\" + answer + \"</strong>\");\n });\n $(notes_text)\n .find(\".pnoteText\")\n .each(function() {\n answer = $(this).val();\n $(this).replaceWith(\n \"<div style='white-space: pre-wrap;'><em>\" +\n answer +\n \"</em></div>\"\n );\n });\n\n var title = $(\"#notes-title\").text();\n var today_pretty = new Date().toDateString();\n\n var mywindow = window.open(\"\", \"new div\", \"height=800,width=800\");\n mywindow.document.write(\"<html><head><title>Sermon Notes</title>\");\n /* optional stylesheet */\n mywindow.document.write(\n '<link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css\">'\n );\n mywindow.document.write(\n '</head><body><div class=\"container mt-3\">'\n );\n mywindow.document.write(\"<h1>\" + title + \"</h1>\");\n mywindow.document.write(\"<h2>\" + today_pretty + \"</h2><hr>\");\n mywindow.document.write($(notes_text).html());\n mywindow.document.write(\"</div></body></html>\");\n setTimeout(function() {\n mywindow.print();\n mywindow.close();\n }, 50);\n\n return true;\n }\n\n $(\"input.blank\")\n .on(\"keyup\", function() {\n // after every keystroke\n var input = $(this);\n var answer = input.val();\n if (\n answer[answer.length - 1] == \" \" &&\n input\n .attr(\"data-answer\")\n .indexOf(\" \") == -1\n ) {\n // if last character was a space (and answer doesn't contain spaces), skip to next field on line\n input.next().focus();\n }\n if (isCorrect(input)) {\n input.addClass(\"correct-answer\");\n } else {\n input.removeClass(\n \"correct-answer wrong-answer\"\n );\n }\n })\n .on(\"blur\", function() {\n // after the field is deselected\n var input = $(this);\n if (isCorrect(input)) {\n input\n .addClass(\"correct-answer\")\n .val(\n input.attr(\n \"data-answer\"\n )\n );\n } else if (input.val().length) {\n input.addClass(\"wrong-answer\");\n }\n })\n .on(\"focus\", function() {\n // when the field is selected\n var input = $(this);\n if (input.hasClass(\"wrong-answer\"))\n input.val(\"\").removeClass(\"wrong-answer\");\n })\n .on(\"keypress\", function(e) {\n var code = e.keyCode || e.which;\n if (code == 13) return false;\n });\n\n // auto-grow textarea with content\n $(\".pnoteText\")\n .on(\"keyup\", function() {\n // reset the padding first (scrollHeight in Firefox works differently than other browsers)\n $(this).css(\"padding\", \"0\");\n\n // measure the real scrollHeight\n $(this).css(\"height\", \"0\"); // Reset the height\n $(this).css(\n \"height\",\n Math.min(this.scrollHeight + 15, 400) + \"px\"\n );\n\n // restore the padding\n $(this).css(\"padding\", \"\");\n })\n .trigger(\"keyup\");\n\n // auto-fill functionality\n $(\".autofill\").on(\"click\", function() {\n if (\n !confirm(\n \"The best way to learn the message is by filling out the notes yourself. This function is only provided as a convienience.\\n\\nAre you sure you want to fill out these notes automatically?\"\n )\n )\n return false;\n\n $(\"#notes input.blank\")\n .each(function() {\n $(this)\n .addClass(\"correct-answer\")\n .removeClass(\"wrong-answer\")\n .val(\n $(this).attr(\n \"data-answer\"\n )\n );\n })\n .first()\n .trigger(\"change\");\n saveToLocalStorage();\n return false;\n });\n\n $(\".clearnotes\").on(\"click\", function() {\n if (\n !confirm(\n \"This will clear all blanks and personal notes. Are you sure you want to do this?\"\n )\n )\n return false;\n $(\"#notes input.blank\")\n .val(\"\")\n .trigger(\"keyup\");\n $(\".pnoteText\")\n .val(\"\")\n .trigger(\"blur\");\n localStorage.setItem(\"notesSlug\", null);\n return false;\n });\n\n // handle the email button\n $(\"#emailButton\").on(\"click\", function(e) {\n $(\"#formAction\").val(\"email\");\n var email = prompt(\n \"What email address would you like to send this to?\"\n );\n if (!!email && email.length) {\n $(\"#formEmail\").val(email);\n } else {\n e.preventDefault();\n }\n });\n\n // handle the download button\n $(\".saveAsPdf\").on(\"click\", function() {\n saveAsPdf();\n });\n\n // save and restore data auto-magically\n if (supportsLocalStorage()) {\n // restore previously saved data if any exists\n var notesData;\n if ((notesData = localStorage.getItem(\"notesSlug\"))) {\n var notesData = JSON.parse(notesData);\n if (typeof notesData == \"object\" && notesData != null) {\n $(\"input.blank\").each(function(i) {\n if (\n typeof notesData.blank[i] == \"string\" &&\n !notesData.blank[i].length\n )\n return;\n\n $(this).val(notesData.blank[i]);\n\n if (isCorrect($(this)))\n $(this).addClass(\"correct-answer\");\n else $(this).addClass(\"wrong-answer\");\n });\n $(\"textarea.pnoteText\").each(function(i) {\n $(this).val(notesData.pnote[i]);\n if (notesData.pnote[i].length) {\n $(this)\n .removeClass(\"hide\")\n .trigger(\"keydown\");\n $(this)\n .prev()\n .addClass(\"hide\");\n }\n // reset the padding first (scrollHeight in Firefox works differently than other browsers)\n $(this).css(\"padding\", \"0\");\n\n // measure the real scrollHeight\n $(this).css(\"height\", \"0\"); // Reset the height\n $(this).css(\n \"height\",\n Math.min(this.scrollHeight + 15, 400) + \"px\"\n );\n\n // restore the padding\n $(this).css(\"padding\", \"\");\n });\n }\n }\n\n // save data as inputs/textareas are changed\n $(\"input.blank, textarea.pnoteText\").on(\"blur\", function() {\n saveToLocalStorage();\n });\n }\n });\n})(jQuery);\n</script>"
},
"passages": [
"Proverbs 31:26"
],
"series": {
"title": "Crazy Joy",
"slug": "crazy-joy",
"description": "<p class=\"summary\">Life is full of acquired tastes. While some are best left alone, others can be a source of great joy! </p>",
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/s/0e8000765_1540867712_series-crazy-joy.png"
},
"categories": {
"faith": "Faith",
"patience": "Patience"
},
"keywords": {
"action": "action",
"attitude": "attitude",
"attraction": "attraction",
"determine": "determine",
"experience": "experience",
"history": "history",
"learn": "learn",
"love": "love",
"nations": "nations",
"sad": "sad"
},
"media": {
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/s/0e6593813_1506380067_sermon-series-women.jpg",
"audio": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjA1IiwibWVkaWFfaWQiOiI2Nzk3MjgxIiwibWVkaWFfZm9ybWF0IjoiMSJ9/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/m/0e5824268_1484682322_mp3test.mp3",
"video": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjA1IiwibWVkaWFfaWQiOiI2Nzk3NDQwIiwibWVkaWFfZm9ybWF0IjoiMTA1In0%3D/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/h264-720/m/0e5824117_1398802515_mp4-test.mp4",
"video_thumbnail": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/video-thumb/m/0e5824106_1398802515_mp4-test.jpg",
"embed": null,
"notes": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/n/0e5824267_1484682314_notestest.pdf"
},
"interactions": {
"shares": 3,
"likes": 29
}
},
{
"id": "1641213",
"title": "God is Holy, so Be Holy!",
"slug": "god-is-holy-so-be-holy",
"detail_url": "https://api.sermoncloud.com/mk040/sermons/god-is-holy-so-be-holy",
"date": {
"carbon": "2019-06-02T07:00:00.000000Z",
"date": "Jun 2, 2019"
},
"preacher": "Bob Smith",
"summary": null,
"text": "<p><span>We have all heard and probably used the expression, “Is nothing holy anymore?” Unfortunately the concept of holiness is fading from our culture. But God is HOLY. And God calls His children to be HOLY. What does it mean and how do we pursue it?</span></p>",
"interactive_note": null,
"passages": [
"1 Peter 1:13-16"
],
"series": {
"title": "Summer Series",
"slug": "summer-series",
"description": "<p class=\"summary\"><span>Get any group of people together long enough and they will develop a culture. They will develop patterns, traditions, values and goals.</span></p>",
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/s/0e8000804_1540873615_series-summer.png"
},
"categories": {
"joy": "Joy"
},
"keywords": null,
"media": {
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/i/0e7989959_1540597492_img-study-3.png",
"audio": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjEzIiwibWVkaWFfaWQiOiI2Nzk3MjgxIiwibWVkaWFfZm9ybWF0IjoiMSJ9/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/m/0e5824268_1484682322_mp3test.mp3",
"video": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjEzIiwibWVkaWFfaWQiOiI2Nzk3NDE1IiwibWVkaWFfZm9ybWF0IjoiMTA1In0%3D/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/h264-720/g/0e6553193_1505167684_golden-hills-with-audio-sized.mp4",
"video_thumbnail": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/video-thumb/g/0e6553191_1505167684_golden-hills-with-audio-sized.jpg",
"embed": null,
"notes": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/n/0e5824267_1484682314_notestest.pdf"
},
"interactions": {
"shares": 0,
"likes": 8
}
}
],
"first_page_url": "/?howmany=2&page=1",
"from": 1,
"last_page": 6,
"last_page_url": "/?howmany=2&page=6",
"next_page_url": "/?howmany=2&page=2",
"path": "/",
"per_page": "2",
"prev_page_url": null,
"to": 2,
"total": "12"
}
Viewing an Individual Sermon for an Account
$templateUrl = "https://api.sermoncloud.com/{account-sermon-cloud-slug}/sermons/{sermon-slug}";
$url = "https://api.sermoncloud.com/mk040/sermons/women-of-god";
$response = Requests::get($url, array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
));
The JSON response looks like the following
{
"data": {
"id": "1641205",
"title": "Women of God",
"slug": "women-of-god",
"detail_url": "https://api.sermoncloud.com/mk040/sermons/women-of-god",
"date": {
"carbon": "2019-06-06T07:00:00.000000Z",
"date": "Jun 6, 2019"
},
"preacher": "Andi Lara",
"summary": "Any group that desires to accomplish anything of value must have leaders.",
"text": "<p class=\"summary\">Any group that desires to accomplish anything of value must have leaders. Leadership is a beautiful and godly thing if done right. The churches in Crete needed godly leaders. If led well those churches would produce quality Christian Workers, workers who could model their lives after their godly leaders. Our passage lays out the qualifications of such leaders and workers.</p>",
"interactive_note": {
"note": "<h2>What is Lorem Ipsum?</h2>\r\n<p><strong>Lorem <input data-lpignore='true' style='width:3.5em;' name='single-line[]' class='blank form-control single-line' data-answer='Ipsum' type='text'> </strong> is simply dummy text of the printing and <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='typesetting' type='text'> industry. Lorem Ipsum has been the industry's standard <input data-lpignore='true' style='width:3.5em;' name='single-line[]' class='blank form-control single-line' data-answer='dummy' type='text'> text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Free Form Note Space' placeholder='Free Form Note Space'></textarea></div>\r\n<p>It has survived not only five centuries, but also the leap into electronic <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='typesetting' type='text'> , remaining <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='essentially' type='text'> unchanged. It was <input data-lpignore='true' style='width:7.7em;' name='single-line[]' class='blank form-control single-line' data-answer='popularised' type='text'> in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Add Your Own Notes Here' placeholder='Add Your Own Notes Here'></textarea></div>\r\n<p> </p>\r\n<div><textarea name='free-form[]' class='pnoteText form-control free-form w-100' data-answer='Free Form Note Space' placeholder='Free Form Note Space'></textarea></div>",
"css": "<style id='notes-css'>#notes .pnoteText {\n display: block;\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 0 0 0 2em;\n border: 0;\n resize: none;\n outline: none;\n font-family: inherit;\n font-size: 1em;\n font-weight: inherit;\n box-shadow: none;\n color: blue;\n}\n\n#notes .blank {\n padding: 0;\n margin: 0;\n border: 0;\n border-bottom: 1px solid #000;\n border-radius: 0;\n background-color: transparent;\n outline: none;\n text-align: center;\n font-family: inherit;\n font-size: 1em;\n font-weight: 700;\n color: #c90;\n}\n\n#notes .blank:focus-within {\n box-shadow: none;\n}\n\n#notes .blank.correct-answer {\n border-color: #090;\n color: #090;\n}\n\n#notes .blank.wrong-answer {\n border-color: #f00;\n color: #f00;\n}\n</style>",
"js": "<script>(function($) {\n $(function() {\n function isCorrect(input) {\n var testAnswer = $.trim(input.val().toLowerCase()).replace(\n /[\\.'\"’,-\\/#!$%\\^&\\*;:{}=\\-_`~()]/g,\n \"\"\n );\n var realAnswer = input\n .attr(\"data-answer\")\n .toLowerCase()\n .replace(/[\\.'\"’,-\\/#!$%\\^&\\*;:{}=\\-_`~()]/g, \"\");\n return testAnswer == realAnswer;\n }\n\n function supportsLocalStorage() {\n return (\n !!window.localStorage &&\n typeof localStorage.getItem === \"function\" &&\n typeof localStorage.setItem === \"function\" &&\n typeof localStorage.removeItem === \"function\"\n );\n }\n\n function saveToLocalStorage() {\n var notesData = { blank: [], pnote: [] };\n $(\"input.blank\").each(function(i) {\n notesData.blank[i] = $(this).val();\n });\n $(\"textarea.pnoteText\").each(function(i) {\n notesData.pnote[i] = $(this).val();\n });\n localStorage.setItem(\"notesSlug\", JSON.stringify(notesData));\n }\n\n function saveAsPdf() {\n var notes_text = $(\"form#notes\").clone()[0];\n\n $(notes_text)\n .find(\".blank\")\n .each(function() {\n answer = $(this).val();\n $(this).replaceWith(\"<strong>\" + answer + \"</strong>\");\n });\n $(notes_text)\n .find(\".pnoteText\")\n .each(function() {\n answer = $(this).val();\n $(this).replaceWith(\n \"<div style='white-space: pre-wrap;'><em>\" +\n answer +\n \"</em></div>\"\n );\n });\n\n var title = $(\"#notes-title\").text();\n var today_pretty = new Date().toDateString();\n\n var mywindow = window.open(\"\", \"new div\", \"height=800,width=800\");\n mywindow.document.write(\"<html><head><title>Sermon Notes</title>\");\n /* optional stylesheet */\n mywindow.document.write(\n '<link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css\">'\n );\n mywindow.document.write(\n '</head><body><div class=\"container mt-3\">'\n );\n mywindow.document.write(\"<h1>\" + title + \"</h1>\");\n mywindow.document.write(\"<h2>\" + today_pretty + \"</h2><hr>\");\n mywindow.document.write($(notes_text).html());\n mywindow.document.write(\"</div></body></html>\");\n setTimeout(function() {\n mywindow.print();\n mywindow.close();\n }, 50);\n\n return true;\n }\n\n $(\"input.blank\")\n .on(\"keyup\", function() {\n // after every keystroke\n var input = $(this);\n var answer = input.val();\n if (\n answer[answer.length - 1] == \" \" &&\n input\n .attr(\"data-answer\")\n .indexOf(\" \") == -1\n ) {\n // if last character was a space (and answer doesn't contain spaces), skip to next field on line\n input.next().focus();\n }\n if (isCorrect(input)) {\n input.addClass(\"correct-answer\");\n } else {\n input.removeClass(\n \"correct-answer wrong-answer\"\n );\n }\n })\n .on(\"blur\", function() {\n // after the field is deselected\n var input = $(this);\n if (isCorrect(input)) {\n input\n .addClass(\"correct-answer\")\n .val(\n input.attr(\n \"data-answer\"\n )\n );\n } else if (input.val().length) {\n input.addClass(\"wrong-answer\");\n }\n })\n .on(\"focus\", function() {\n // when the field is selected\n var input = $(this);\n if (input.hasClass(\"wrong-answer\"))\n input.val(\"\").removeClass(\"wrong-answer\");\n })\n .on(\"keypress\", function(e) {\n var code = e.keyCode || e.which;\n if (code == 13) return false;\n });\n\n // auto-grow textarea with content\n $(\".pnoteText\")\n .on(\"keyup\", function() {\n // reset the padding first (scrollHeight in Firefox works differently than other browsers)\n $(this).css(\"padding\", \"0\");\n\n // measure the real scrollHeight\n $(this).css(\"height\", \"0\"); // Reset the height\n $(this).css(\n \"height\",\n Math.min(this.scrollHeight + 15, 400) + \"px\"\n );\n\n // restore the padding\n $(this).css(\"padding\", \"\");\n })\n .trigger(\"keyup\");\n\n // auto-fill functionality\n $(\".autofill\").on(\"click\", function() {\n if (\n !confirm(\n \"The best way to learn the message is by filling out the notes yourself. This function is only provided as a convienience.\\n\\nAre you sure you want to fill out these notes automatically?\"\n )\n )\n return false;\n\n $(\"#notes input.blank\")\n .each(function() {\n $(this)\n .addClass(\"correct-answer\")\n .removeClass(\"wrong-answer\")\n .val(\n $(this).attr(\n \"data-answer\"\n )\n );\n })\n .first()\n .trigger(\"change\");\n saveToLocalStorage();\n return false;\n });\n\n $(\".clearnotes\").on(\"click\", function() {\n if (\n !confirm(\n \"This will clear all blanks and personal notes. Are you sure you want to do this?\"\n )\n )\n return false;\n $(\"#notes input.blank\")\n .val(\"\")\n .trigger(\"keyup\");\n $(\".pnoteText\")\n .val(\"\")\n .trigger(\"blur\");\n localStorage.setItem(\"notesSlug\", null);\n return false;\n });\n\n // handle the email button\n $(\"#emailButton\").on(\"click\", function(e) {\n $(\"#formAction\").val(\"email\");\n var email = prompt(\n \"What email address would you like to send this to?\"\n );\n if (!!email && email.length) {\n $(\"#formEmail\").val(email);\n } else {\n e.preventDefault();\n }\n });\n\n // handle the download button\n $(\".saveAsPdf\").on(\"click\", function() {\n saveAsPdf();\n });\n\n // save and restore data auto-magically\n if (supportsLocalStorage()) {\n // restore previously saved data if any exists\n var notesData;\n if ((notesData = localStorage.getItem(\"notesSlug\"))) {\n var notesData = JSON.parse(notesData);\n if (typeof notesData == \"object\" && notesData != null) {\n $(\"input.blank\").each(function(i) {\n if (\n typeof notesData.blank[i] == \"string\" &&\n !notesData.blank[i].length\n )\n return;\n\n $(this).val(notesData.blank[i]);\n\n if (isCorrect($(this)))\n $(this).addClass(\"correct-answer\");\n else $(this).addClass(\"wrong-answer\");\n });\n $(\"textarea.pnoteText\").each(function(i) {\n $(this).val(notesData.pnote[i]);\n if (notesData.pnote[i].length) {\n $(this)\n .removeClass(\"hide\")\n .trigger(\"keydown\");\n $(this)\n .prev()\n .addClass(\"hide\");\n }\n // reset the padding first (scrollHeight in Firefox works differently than other browsers)\n $(this).css(\"padding\", \"0\");\n\n // measure the real scrollHeight\n $(this).css(\"height\", \"0\"); // Reset the height\n $(this).css(\n \"height\",\n Math.min(this.scrollHeight + 15, 400) + \"px\"\n );\n\n // restore the padding\n $(this).css(\"padding\", \"\");\n });\n }\n }\n\n // save data as inputs/textareas are changed\n $(\"input.blank, textarea.pnoteText\").on(\"blur\", function() {\n saveToLocalStorage();\n });\n }\n });\n})(jQuery);\n</script>"
},
"passages": [
"Acts 6:8-10, Acts 7:51-60"
],
"series": {
"title": "Crazy Joy",
"slug": "crazy-joy",
"description": "<p class=\"summary\">Life is full of acquired tastes. While some are best left alone, others can be a source of great joy! </p>",
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/s/0e8000765_1540867712_series-crazy-joy.png"
},
"categories": {
"faith": "Faith",
"patience": "Patience"
},
"keywords": {
"action": "action",
"attitude": "attitude",
"attraction": "attraction",
"determine": "determine",
"experience": "experience",
"history": "history",
"learn": "learn",
"love": "love",
"nations": "nations",
"sad": "sad"
},
"media": {
"image": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/s/0e6593813_1506380067_sermon-series-women.jpg",
"audio": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjA1IiwibWVkaWFfaWQiOiI2Nzk3MjgxIiwibWVkaWFfZm9ybWF0IjoiMSJ9/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/m/0e5824268_1484682322_mp3test.mp3",
"video": "https://historian.ministrycloud.com/r/eyJzaXRlX2lkIjoiMjE0NzkiLCJzZXJtb25faWQiOiIxNjQxMjA1IiwibWVkaWFfaWQiOiI2Nzk3NDQwIiwibWVkaWFfZm9ybWF0IjoiMTA1In0%3D/https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/h264-720/m/0e5824117_1398802515_mp4-test.mp4",
"video_thumbnail": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/video-thumb/m/0e5824106_1398802515_mp4-test.jpg",
"embed": null,
"notes": "https://bf770cc5901ccdeeffd1-76e4d34e60095f4b19fe49fbcb244f73.ssl.cf2.rackcdn.com/uploaded/n/0e5824267_1484682314_notestest.pdf"
},
"interactions": {
"shares": 3,
"likes": 29
}
}
}