Media


All Media Items

Base URL returns full list of all media items:

https://api.countrysidebible.org/media

Example response:

{
  "mediaEntries": [
    {
      "published": true,
      "id": 7671,
      "mediacode": "20190414p_c-ser_t-tp",
      "date": "2019-04-14 PM",
      "title": "The King of Beasts",
      "teacher": {
        "id": 1,
        "name": "Tom Pennington",
        "status": "Pastor-Teacher",
        "suffix": "tp"
      },
      "text": "Daniel 7",
      "series": {
        "id": 245,
        "name": "Daniel"
      },
      "category": {
        "id": 1,
        "name": "Sermons",
        "suffix": "ser"
      },
      "streaming": {
        "streaming": true,
        "liveNow": false,
        "startTs": 1555282200,
        "start": "2019-04-14 17:50:00",
        "endTs": 1555288800,
        "end": "2019-04-14 19:40:00"
      },
      "files": {
        "slides": "20190414p_c-ser_t-tp_slides.pdf",
        "outline": "20190414p_c-ser_t-tp_outline.pdf",
        "transcript": "20190414p_c-ser_t-tp_transcript.pdf",
        "transcript_html": "20190414p_c-ser_t-tp_tansctipt.html"
      },
      "audio": {
        "mp3": "20190414p_c-ser_t-tp.mp3",
        "duration": "56:43",
        "filesize": 56152484
      },
      "video": {
        "vimeo_mp4": "https://player.vimeo.com/external/330493853.hd.mp4?s=f6568c9d2b9a9da1071c51665100f18e8d9cf22f&profile_id=175",
        "vimeo_m3u8": "https://player.vimeo.com/external/330493853.m3u8?s=81053e26320c973bca6887d9e45f895ff256f9d8",
        "poster": "20190414p_c-ser_t-tp_poster.jpg"
      }
    },
    {
      "published": true,
      "id": 7670,
      "mediacode": "20190414a_c-wks",
      "date": "2019-04-14 AM",
      "title": "Parenting Teens Class (Part 5)",
      "teacher": {
        "id": 54,
        "name": "Justin Turner",
        "suffix": "jt"
      },
      "text": "Selected Scriptures",
      "series": {
        "id": 251,
        "name": "Parenting Teens"
      },
      "category": {
        "id": 10,
        "name": "Workshops / Seminars",
        "suffix": "wks"
      },
      "audio": {
        "mp3": "20190414a_c-wks.mp3",
        "duration": "1:08:04",
        "filesize": 67062129
      }
    },
  ],
  ...
  ...
  "metadata": {
    "s3MediaUrl": "https://s3.amazonaws.com/media.countrysidebible.org",
    "count": 7578
  }
}

Single Media Item

Specifying the mediacode after the base URL will return the single media item with that unique media code:

Example request:

https://api.countrysidebible.org/media/20190113p_c-ser_t-tp

Example response:

{
  "mediaEntries": [
    {
      "published": true,
      "id": 7468,
      "mediacode": "20190113p_c-ser_t-tp",
      "date": "2019-01-13 PM",
      "title": "Through the Fire (Part 3)",
      "teacher": {
        "id": 1,
        "name": "Tom Pennington",
        "status": "Pastor-Teacher",
        "suffix": "tp"
      },
      "text": "Daniel 3",
      "series": {
      "id": 245,
      "name": "Daniel"
      },
      "category": {
        "id": 1,
        "name": "Sermons",
        "suffix": "ser"
      },
      "streaming":{
        "streaming":true,
        "startTs":1547423400,
        "start":"2019-01-13 17:50:00",
        "endTs":1547430300,
        "end":"2019-01-13 19:45:00"
      },
      "files": {
        "slides": "20190113p_c-ser_t-tp_slides.pdf",
        "outline": "20190113p_c-ser_t-tp_outline.pdf",
        "transcript": "20190113p_c-ser_t-tp_transcript.pdf",
        "transcript_html": "20190113p_c-ser_t-tp_tansctipt.html"
      },
      "audio": {
        "mp3": "20190113p_c-ser_t-tp.mp3",
        "duration": "57:29",
        "filesize": 34524455
      },
      "video": {
        "vimeo_mp4": "https://player.vimeo.com/external/311270262.hd.mp4?s=f437f7271180c5b55c959ae2465bf089fd8d8a31&profile_id=175",
        "vimeo_m3u8": "https://player.vimeo.com/external/311270262.m3u8?s=502205d66dc2cd4378295c05ec84bcc4e062d246",
        "poster": "20190113p_c-ser_t-tp_poster.jpg"
      }
    }
  ],
  "metadata": {
    "s3MediaUrl": "https://s3.amazonaws.com/media.countrysidebible.org",
    "count": 1
  }
}

Manipulating the Data

The media items can be filtered by a number of parameters passed in via the URL query string. These can be combined in any way you want, although you may reduce the list to 0 with some combinations.