The Pugpig Distribution Service allows you to make a couple of different remote HTTP calls to our API, so that you can process content without clicking ‘Update Content’ in the dashboard itself, or in the widget.
To update all changed editions (and retry failed pages), perform a GET HTTP request with a URL of this form:https://<account_code>.admin.pugpig.com/publication/<publication_code>/addon/<addon_code>/action/update_content?apiKey=<api_key>
To update a specific edition (if it has changed), perform a GET HTTP request with a URL of this form:https://<account_code>.admin.pugpig.com/publication/<publication_code>/addon/<endpoint_prefix>.<publication_code>.<account_code>/action/update_content/<edition_id>?apiKey=<api_key>
Where:
account_code is your account code in the distribution service
publication_code is the publication code in the distribution service
endpoint_prefix is the endpoint prefix set in distribution, usually this will be something like, 'main' or 'prod'
edition_id is a url encoding of the edition id from the OPDS/ATOM feeds
api_key is the unique identifier for your Pugpig Distribution Service account
The response will be a redirect to the widget HTML. There is currently no easy way of seeing whether the request had the required result programmatically beyond trying to parse the resultant HTML content.
We hope to put in place a more fully featured and useful API in the future.
Comments
0 comments
Please sign in to leave a comment.