API Documentation

Homepages

/{iid}/homepage/{day}/headline_stories

GET

Get headline stories (automation settings / list of manual stories).

Sample Call

The Monday homepage has a manually set list of headline stories:

>>> GET("/123/homepage/mon/headline_stories")
{'auto': False,
 'items': [{'description': 'This is descriptive text for a headline story...',
            'image_uuid': 'd16f1ded-7255-38bf-83d2-2223728662ae',
            'link_uuid': '799d6c73-fe75-11df-837b-001ec21bff9e',
            'title': 'Headline Story 01',
            'type': 'content'},
           {'description': 'This is descriptive text for a headline story...',
            'image_uuid': 'f6294df8-9023-3687-865b-af22de234abf',
            'link_uuid': '9eecdeab-fe95-11df-9c2f-001ec21bff9e',
            'title': 'Headline Story 02',
            'type': 'content'}]}

The Wednesday homepage is set to automation:

>>> GET("/123/homepage/wed/headline_stories")
{'auto': True,
 'auto_max': 2,
 'auto_tag_uuids': ['60183d70-a998-11e1-afa6-0800200c9a66',
                    '7fbbe910-a998-11e1-afa6-0800200c9a66']}

PUT

Set headline stories (automation settings / list of manual stories).

Sample Call

Setting a manual list of headline stories for Monday:

>>> PUT("/123/homepage/mon/headline_stories",
...         {"items": [
...             {'title': 'Headline Story 1',
...              'description': 'Headline Story 1 Description',
...              'image_uuid': '8fdabced-2583-356b-a890-260d795a0f19',
...              'type': 'link',
...              'link_url': 'http://www.example.com/feature_story'},
...             {'title': 'Headline Story 2',
...              'description': 'Headline Story 2 Description',
...              'image_uuid': '8fdabced-2583-356b-a890-260d795a0f19',
...              'type': 'content',
...              'link_uuid': 'a33b5997-00ca-11e0-b096-001ec21bff9e'}]})
{'url': 'https://api.metropublisher.com/123/homepage/mon/headline_stories'}

Setting the automation for headline stories for Wednesday:

>>> PUT("/123/homepage/wed/headline_stories",
...         {"auto": True,
...          "auto_max": 3,
...          "auto_tag_uuids": ['60183d70-a998-11e1-afa6-0800200c9a66',
...                             '7fbbe910-a998-11e1-afa6-0800200c9a66']
...          })
{'url': 'https://api.metropublisher.com/123/homepage/wed/headline_stories'}

Parameters

auto:

If true, headline stories will be auto populated.

New in MP 2.9:

With MP 2.9, homepage headline stories can be automated.

(also see ChangeLog)

optional

Default: False

Additional parameters for type: auto (auto = true)

auto_max:

Maximum number of headline stories.

New in MP 2.9:

With MP 2.9, homepage headline stories can be automated.

(also see ChangeLog)

optional

Default: 5

Values must not be lower than 1 or higher than 8

auto_tag_uuids:

List of tags to filter the auto populated headline stories on.

New in MP 2.9:

With MP 2.9, homepage headline stories can be automated.

(also see ChangeLog)

optional

Default: None

Additional parameters for type: manual (auto = false)

items:

List of manually set headline stories.

optional

Note

required

if the parameter auto is set to 'False'.

Every element of the list is a dictionary, each consisting of the following fields:

title:

The title override for this headline story.

required

Example value: "Object A Title"

Values must not be longer than 255

description:

The description override for this headline story.

required

Values must not be longer than 250

image_uuid:

UUID of a linked image

optional

Default: None

Example value: '123456578-1234-1234-1234-123456789abc'

Values must obey all the conditions

  • be existing image UUID

  • be UUID or None

type:

The type of headlinestory

required

Example value: "content"

Values must be any of the following

content:

A link to an item of content

link:

Arbitrary URL

Additional parameters for type: content

link_uuid:

The UUID of the object associated with this headline story.

optional

Default: None

Example value: '12345678-1234-1234-1234-123456789abc'

Content object with the given UUID must exist in the Metro Publisher instance.

Additional parameters for type: link

link_url:

The URL the headline story points to.

optional

Default: None

Example value: "http://www.example.com/headline_story"

Table Of Contents

Previous topic

Files

Next topic

Locations