Retrieve a batched collection of comments.
This resource returns a batched list of comments. The comment information returned depends on the fields parameter.
>>> GET("/123/comments?fields=uuid-title-state-parent_url-parent_type")
{'items': [['12345678-1234-1234-1234-123456789abc',
'I think...',
'published',
'https://api.metropublisher.com/123/content/799d6c73-fe75-11df-837b-001ec21bff9e',
'content']]}
page: | The page number to retrieve. optional Default: 1 Values must not be lower than 1 |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rpp: | The number of results per page. optional Default: 20 Values must not be lower than 1 or higher than 100 |
||||||||||||||||||||
state: | optional Default: 'published' if the user is a public user else None. Values must be any of the following
|
||||||||||||||||||||
fields: | A dash-separated list of fields to return. optional Default: ['url'] Example value: 'created-uuid' Every element of the list must be any of the following
|
||||||||||||||||||||
order: | A dash-separated list of orderings to apply optional Default: None Every element of the list must obey all the conditions
|
||||||||||||||||||||
parents: | An underscore-seperated list of comment parent UUIDs. optional Default: None |
Retrieve one comment.
This resource returns information about one specific comment.
>>> GET("/123/comments/12345678-1234-1234-1234-123456789abc")
{'comment': '... this article rocks!',
'created': '2000-01-01T10:00:00',
'creator': 'Hans Meier',
'edited_comment': None,
'edited_title': None,
'email': 'hans.meier@domain.com',
'fb_uid': '12345678910',
'parent_type': 'content',
'parent_url': 'https://api.metropublisher.com/123/content/799d6c73-fe75-11df-837b-001ec21bff9e',
'state': 'published',
'title': 'I think...',
'uuid': '12345678-1234-1234-1234-123456789abc'}
comment: | The original comment text. |
---|---|
created: | The creation date/time in ISO 8601 format. See Dates and Times. |
creator: | The name of the commentor. |
edited_comment: | The edited version of the original comment text. The comment may have been edited by, for example, a moderator due to typos or to update the original comment. |
edited_title: | The edited version of the original comment title. The title may have been edited by, for example, a moderator due to a typo or to update the original title. |
email: | The email address of the commentor. |
fb_uid: | The Facebook User-ID of the commentor. |
parent_type: | The type of the comment's parent object, i.e. whether the parent is a comment itself or a content object. |
parent_url: | URL of the comment's parent object, e.g. the comment for which this comment is a reply or a content object like an article. |
state: | The comment state, i.e. 'draft' or 'published' |
title: | The original comment title |
uuid: | The UUID of the comment. |
Create/update a comment.
Sending data to this resource does one of two things:
>>> PUT("/123/comments/12345678-1234-1234-1234-123456789abc",
... {"title": "I think...",
... "comment": "... this article rocks!",
... "created": "2000-01-01T10:00:00",
... "creator": "Hans Meier",
... "email": "hans.meier@domain.com",
... "fb_uid": "12345678910",
... "state": "published",
... "parent_type": "content",
... "parent_uuid": "799d6c73-fe75-11df-837b-001ec21bff9e",
... })
{'url': 'https://api.metropublisher.com/123/comments/12345678-1234-1234-1234-123456789abc',
'uuid': '12345678-1234-1234-1234-123456789abc'}
parent_type: | This is the type of the comment's parent, e.g. 'content' or 'comment'. required Example value: "content" Values must be any of the following
|
||||
---|---|---|---|---|---|
parent_uuid: | The UUID of the comment to which this comment is a reply. required Parent object with the given UUID must exist in the Metro Publisher instance. |
||||
title: | The original comment title required Example value: "My 2 cents" |
||||
edited_title: |
optional Default: None Example value: "My 2¢" |
||||
comment: | The original comment text. required Example value: "I think this article rocks!" |
||||
edited_comment: |
optional Default: None Example value: "I think this article is very well written!" |
||||
created: | The creation date/time in ISO 8601 format. See Dates and Times. optional Default: <current timestamp> Example value: '2012-01-01T11:30:45' |
||||
creator: | The name of the commentor. optional Note required if 'fb_uid' is empty |
||||
state: | The comment state. optional Default: 'draft' Values must be any of the following
|
||||
fb_uid: | A Facebook User-ID. optional Note required if 'creator' is empty Values must match the following regular expression: ^[0-9]*$
Info: The value must consist only of numbers. |
||||
email: | The email address of the commenting user. optional Default: None Values must match the following regular expression: ^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@[A-Za-z0-9.-]+\.[A-Za-z]*$
Info: The regular expression tries to verify the following pattern: <string of characters>@<string of characters>.<string of characters> The first string may contain a number of different special characters besides letters and numbers, such as an underscore (_) or asterisk (*), while the second string must contain only letters, numbers, dashes (-) and dots (.). |