Editions
As I mentioned in the introduction, an edition is a collection of articles grouped by a pugpig_container
entity of the FlowzCollection type.
The REST API is not used as there is additional processing not available in the REST API that needs doing on updates.
The custom endpoints have the same structural interface as the standard REST endpoints in terms of the JSON you post to them.
The custom endpoint for this are below:
// Create a new
/api/collection: POST
// Update an existing one
/api/collection/{id}: POST
// Get an existing one
/api/collection/{id}: GET
Bundles and Collection Types
The pugpig_container entity type has 2 subtypes that act in a similar way to the traditional bundles
They are used to tell the difference between Daily Editions andSpecial Editions
This type is set to this field on the collection entity field_pugpig_edition_type
The API for this is a little misleading as that isn't really a list of bundles, it's the types for the field:
http://indy-api-local.brightsites.co.uk/api/pugpig-edition/bundles
The bundles endpoint for the collection entities is here:
https://indy-api-prod.brightsites.co.uk/api/collection/bundles
Searching and Listing Editions
You can search any of the different bundles using this endpoint, the Editions List page for example in the CMS would use the example below
/api/collections/{bundle}
// eg to search all pugpig_collection entities
https://indy-api-prod.brightsites.co.uk/api/collections/pugpig_container
This endpoint has the following query params to page and search
Query Parameter | Description |
---|---|
q | An optional search query |
status | 1 or 0 whether you’re looking for published or unpublished entities |
type | daily or special, will only work on the collection entities |
key | The key that is used to identify the edition in Pugpig |
limit | Number to get |
offset | Where to start from |