Story Profile

CrookedNumber edited this page Nov 25, 2014 · 12 revisions

Heritage

Story Profile extends Base Content Profile. This document only describes additional semantics provided by the Story profile. Please make sure to read the Base Content Profile spec, first.

Profile Definition

{
  "version": "1.0",
  "attributes": {
    "created": "2013-10-17T17:24:46+00:00",
    "guid": "b9ce545e-01a2-44d0-9a15-a73da4ed304b",
    "modified": "2013-10-22T21:50:10+00:00",
    "published": "2013-02-11T13:21:31+00:00",
    "title": "Story Profile",
    "valid": {
      "from": "2013-02-11T13:21:31+00:00",
      "to": "3013-05-11T13:21:31+00:00"
    }
  },
  "links": {
    "alternate": [
      {
        "href": "https://api-sandbox.pmp.io/profiles/story"
      }
    ],
    "creator": [
      {
        "href": "https://api-sandbox.pmp.io/docs/af676335-21df-4486-ab43-e88c1b48f026"
      }
    ],
    "documentation": [
      {
        "href": "https://github.com/publicmediaplatform/pmpdocs/wiki/News-Story-Profile",
        "type": "text/html"
      }
    ],
    "edit": [ARRAY]
  }
}

Example Document

Let's look at a copy of a sample story item located at: URL: https://api-sandbox.pmp.io/docs/b3a41057-36ef-4f56-9e5c-c2b3200a6ac1

{
  "version": "1.0"
, "attributes": {
    "valid": {
      "from": "2013-11-06T20:57:59+00:00"
    , "to": "3013-11-06T20:57:59+00:00"
    }
  , "created": "2013-11-06T20:57:59+00:00"
  , "modified": "2013-11-08T13:01:44+00:00"
  , "tags": [
      "samplecontent"
    ]
  , "guid": "b3a41057-36ef-4f56-9e5c-c2b3200a6ac1"
  , "title": "Some Further Observations on Atmospherical Refraction. (January 1, 1800)"
  , "contenttemplated": "{{#4ee67ec4-1341-473f-89af-d632c0163a43}}\nHe has consequently been induced to make a course of ob-  servations on other circumpolar stars, beyond the former limits, and  as near to his north horizon as the situation of his observatory would  permit. Since the formula of Dr. Bradley appears most conveniently  applicable to the purposes of the practical astronomer, but not quite  correct in the numbers assumed for refraction at 45°, and for the co-  efficient of x, the author has endeavoured to find out such numbers  as would correspond more accurately with observation, and has found  that the same formula may be made to serve as low down as to 87°  of zenith distance, by increasing the amount of the numbers before  mentioned still a little more than he had formerly done.\n{{#866da225-5fd4-4702-a3ae-183500aeb481}}\nThe table of observations on which these estimates are founded is  divided into two parts ; the former of which is the result of more  than 240 observations made upon sixteen stars between 80° and 87°  zenith distance ; and the latter is founded upon six other stars be-  tween 87° and 88° 42' zenith distance.\n{{#8a82fd83-65f9-44be-9af2-14321c488bb9}}"
  , "hreflang": "en"
  , "published": "2013-11-06T20:57:59+00:00"
  }
, "links": {
    "profile": [
      {
        "href": "https://api-sandbox.pmp.io/profiles/story"
      }
    ]
  , "item": [
      {
        "href": "https://api-sandbox.pmp.io/docs/4ee67ec4-1341-473f-89af-d632c0163a43"
      }
    , {
        "href": "https://api-sandbox.pmp.io/docs/866da225-5fd4-4702-a3ae-183500aeb481"
      }
    , {
        "href": "https://api-sandbox.pmp.io/docs/8a82fd83-65f9-44be-9af2-14321c488bb9"
      }
    ]
  , "creator": [
      {
        "href": "https://api-sandbox.pmp.io/docs/af676335-21df-4486-ab43-e88c1b48f026"
      }
    ]
  , "navigation": [
      {
        "href": "https://api-sandbox.pmp.io/docs?guid=b3a41057-36ef-4f56-9e5c-c2b3200a6ac1"
      , "rels": [
          "urn:pmp:navigation:self"
        ]
      , "totalitems": 3
      , "totalpages": 1
      , "pagenum": 1
      }
    ]
  , "query": [
      {
        "href-template": "https://api-sandbox.pmp.io/users{?limit,offset,tag,collection,text,searchsort,has}"
      , "title": "Query for users"
      , "rels": [
          "urn:pmp:query:users"
        ]
      , "href-vars": {
          "limit": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "offset": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "tag": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "collection": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "text": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "searchsort": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "has": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      }
    , {
        "href-template": "https://api-sandbox.pmp.io/groups{?limit,offset,tag,collection,text,searchsort,has}"
      , "title": "Query for groups"
      , "rels": [
          "urn:pmp:query:groups"
        ]
      , "href-vars": {
          "limit": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "offset": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "tag": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "collection": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "text": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "searchsort": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      }
    , {
        "href-template": "https://api-sandbox.pmp.io/profiles{/guid}"
      , "title": "Access profiles"
      , "rels": [
          "urn:pmp:hreftpl:profiles"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      }
    , {
        "href-template": "https://api-sandbox.pmp.io/schemas{/guid}"
      , "title": "Access schemas"
      , "rels": [
          "urn:pmp:hreftpl:schemas"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      , "type": "application/schema+json"
      }
    , {
        "href-template": "https://api-sandbox.pmp.io/docs{/guid}{?limit,offset}"
      , "title": "Access documents"
      , "rels": [
          "urn:pmp:hreftpl:docs"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "limit": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "offset": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      }
    , {
        "href-template": "https://api-sandbox.pmp.io/docs{?limit,offset,tag,collection,text,searchsort,has,author,distributor,distributorgroup,startdate,enddate,profile,language}"
      , "title": "Query for documents"
      , "rels": [
          "urn:pmp:query:docs"
        ]
      , "href-vars": {
          "limit": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "offset": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "tag": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "collection": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "text": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "searchsort": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "has": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "author": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "distributor": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "distributorgroup": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "startdate": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "enddate": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "profile": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        , "language": "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
        }
      , "hints": {
          "allow": [
            "GET"
          ]
        }
      }
    , {
        "href": "https://api-sandbox.pmp.io/guids"
      , "title": "Generate guids"
      , "rels": [
          "urn:pmp:query:guids"
        ]
      , "hints": {
          "allow": [
            "POST"
          ]
        , "accept-post": [
            "application/x-www-form-urlencoded"
          ]
        }
      , "type": "application/json"
      }
    ]
  , "edit": [
      {
        "href-template": "https://publish-sandbox.pmp.io/docs{/guid}"
      , "title": "Document Save"
      , "rels": [
          "urn:pmp:form:documentsave"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Globaly-Unique-Identifiers-for-PMP-Documents"
        }
      , "hints": {
          "formats": [
            "application/vnd.pmp.collection.doc+json"
          ]
        , "allow": [
            "PUT"
          , "DELETE"
          ]
        , "docs": "https://github.com/publicmediaplatform/pmpdocs/wiki/Collection.doc-JSON-Media-Type"
        }
      }
    , {
        "href-template": "https://publish-sandbox.pmp.io/profiles{/guid}"
      , "title": "Profile Save"
      , "rels": [
          "urn:pmp:form:profilesave"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Globaly-Unique-Identifiers-for-PMP-Documents"
        }
      , "hints": {
          "formats": [
            "application/vnd.pmp.collection.doc+json"
          ]
        , "allow": [
            "PUT"
          , "DELETE"
          ]
        , "docs": "https://github.com/publicmediaplatform/pmpdocs/wiki/Profile-profile"
        }
      }
    , {
        "href-template": "https://publish-sandbox.pmp.io/schemas{/guid}"
      , "title": "Schema Save"
      , "rels": [
          "urn:pmp:form:schemasave"
        ]
      , "href-vars": {
          "guid": "https://github.com/publicmediaplatform/pmpdocs/wiki/Globaly-Unique-Identifiers-for-PMP-Documents"
        }
      , "hints": {
          "formats": [
            "application/schema+json"
          ]
        , "allow": [
            "PUT"
          , "DELETE"
          ]
        , "docs": "http://json-schema.org/"
        }
      }
    , {
        "href": "https://publish-sandbox.pmp.io/files"
      , "title": "Upload a rich media file"
      , "rels": [
          "urn:pmp:form:mediaupload"
        ]
      , "href-vars": {
          "submission": "https://github.com/publicmediaplatform/pmpdocs/wiki/Media-File-Upload"
        }
      , "hints": {
          "allow": [
            "POST"
          ]
        , "accept-post": [
            "multipart/form-data"
          ]
        }
      }
    ]
  }
, "items": [
    {
      "version": "1.0"
    , "attributes": {
        "valid": {
          "from": "2013-10-02T16:07:14+00:00"
        , "to": "3013-10-02T16:07:14+00:00"
        }
      , "created": "2013-10-02T16:07:14+00:00"
      , "modified": "2013-11-08T13:01:35+00:00"
      , "tags": [
          "samplecontent"
        ]
      , "guid": "4ee67ec4-1341-473f-89af-d632c0163a43"
      , "title": "2009 Christmas Bird Count"
      , "contenttemplated": "Birders participate in the 2009 Christmas Bird Count at Ash Meadows National Wildlife Refuge"
      , "published": "2013-10-02T16:07:14+00:00"
      }
    , "links": {
        "profile": [
          {
            "href": "https://api-sandbox.pmp.io//profiles/image"
          }
        ]
      , "enclosure": [
          {
            "href": "http://digitalmedia.fws.gov/FullRes/natdiglib/5489675079_bbffdb73db_b.jpg"
          }
        ]
      , "creator": [
          {
            "href": "https://api-sandbox.pmp.io/docs/af676335-21df-4486-ab43-e88c1b48f026"
          }
        ]
      , "navigation": [
          {
            "href": "https://api-sandbox.pmp.io/docs?guid=4ee67ec4-1341-473f-89af-d632c0163a43"
          , "rels": [
              "urn:pmp:navigation:self"
            ]
          }
        ]
      }
    }
  , {
      "version": "1.0"
    , "attributes": {
        "valid": {
          "from": "2013-10-01T14:51:08+00:00"
        , "to": "3013-10-01T14:51:08+00:00"
        }
      , "created": "2013-10-01T14:51:08+00:00"
      , "modified": "2013-11-08T13:01:35+00:00"
      , "tags": [
          "samplecontent"
        ]
      , "guid": "866da225-5fd4-4702-a3ae-183500aeb481"
      , "title": "Practicing Democracy in the Classroom (1953)"
      , "published": "2013-10-01T14:51:08+00:00"
      }
    , "links": {
        "profile": [
          {
            "href": "https://api-sandbox.pmp.io/profiles/video"
          }
        ]
      , "enclosure": [
          {
            "href": "http://archive.org/download/Practici1953/Practici1953_512kb.mp4"
          }
        ]
      , "creator": [
          {
            "href": "https://api-sandbox.pmp.io/docs/af676335-21df-4486-ab43-e88c1b48f026"
          }
        ]
      , "navigation": [
          {
            "href": "https://api-sandbox.pmp.io/docs?guid=866da225-5fd4-4702-a3ae-183500aeb481"
          , "rels": [
              "urn:pmp:navigation:self"
            ]
          }
        ]
      }
    }
  , {
      "version": "1.0"
    , "attributes": {
        "valid": {
          "from": "2013-10-01T14:51:08+00:00"
        , "to": "3013-10-01T14:51:08+00:00"
        }
      , "created": "2013-10-01T14:51:08+00:00"
      , "modified": "2013-11-08T13:01:44+00:00"
      , "tags": [
          "samplecontent"
        ]
      , "guid": "8a82fd83-65f9-44be-9af2-14321c488bb9"
      , "title": "Volcanoes"
      , "published": "2013-10-01T14:51:08+00:00"
      }
    , "links": {
        "profile": [
          {
            "href": "https://api-sandbox.pmp.io/profiles/video"
          }
        ]
      , "enclosure": [
          {
            "href": "http://archive.org/download/volcanoes/volcanoes_512kb.mp4"
          }
        ]
      , "creator": [
          {
            "href": "https://api-sandbox.pmp.io/docs/af676335-21df-4486-ab43-e88c1b48f026"
          }
        ]
      , "navigation": [
          {
            "href": "https://api-sandbox.pmp.io/docs?guid=8a82fd83-65f9-44be-9af2-14321c488bb9"
          , "rels": [
              "urn:pmp:navigation:self"
            ]
          }
        ]
      }
    }
  ]
}

Story Fields

  • byline - optional. A rendered byline as suggested by the content distributor. API clients may chose to render custom, more 'sophisticated' byline using author H-Factors instead.
  • teaser - optional. Brief summary of the content.
  • description - optional. A representation of the content of this document without HTML (neither tags nor HTML entities).
  • contentencoded - optional. A full-HTML version of content. Be careful with potentially dangerous elements when rendering!
  • contenttemplated - optional. A version of content that has placeholder for rich-media assets. This is often good (when present) for displaying content on non-HTML devices or for swapping rendering of rich media assets as appropriate for a specific platform.