Skip to content
Permalink
Browse files

Merge pull request #1235 from liveblog/apiary/amp-commenting

documented the new commenting api endpoint in apiary
  • Loading branch information...
eos87 committed Oct 1, 2018
2 parents 88d8286 + 8375612 commit 87aec1dc82a61ff30d6568200411b9d51f47fe6f
Showing with 138 additions and 0 deletions.
  1. +138 −0 docs/apiary.apib
@@ -582,6 +582,10 @@ List available resources.
{
"href": "archive/translate",
"title": "translate"
},
{
"href": "client_item_comments",
"title": "client_item_comments"
}
]
}
@@ -4149,3 +4153,137 @@ A single Producer resource.
+ Response 204 (application/json)
### Creating comment amp [POST]
+ Request (application/json)
{
"text": "test",
"commenter": "gyan",
"client_blog": "5b9f846f6281bb4408ad4948"
}
+ Response 201 (application/json)
{
"_id": "urn:newsml:localhost:2018-09-18T12:24:12.607966:e912259a-e537-4321-9ca7-6fb9bb0d56b3",
"groups": [
{
"id": "root",
"role": "grpRole:NEP",
"refs": [{"idRef": "main"}]
},
{
"id": "main",
"role": "grpRole:Main",
"refs": [
{
"residRef": "urn:newsml:localhost:2018-09-18T12:24:12.433147:c287623f-c8c3-4fcb-9af9-1cbb3bbe4902",
"guid": "urn:newsml:localhost:2018-09-18T12:24:12.433147:c287623f-c8c3-4fcb-9af9-1cbb3bbe4902",
"type": "text",
"item": {
"_id": "urn:newsml:localhost:2018-09-18T12:24:12.433147:c287623f-c8c3-4fcb-9af9-1cbb3bbe4902",
"original_creator": "None",
"unique_id": 1107,
"flags": {
"marked_archived_only": false,
"marked_for_legal": false,
"marked_for_not_publication": false,
"marked_for_sms": false
},
"linked_in_packages": [
{
"package": "urn:newsml:localhost:2018-09-18T12:24:12.607966:e912259a-e537-4321-9ca7-6fb9bb0d56b3"
}
],
"_etag": "3e327500e6bf5a3cbad3a446afca8781516a3819",
"item_type": "comment",
"type": "text",
"commenter": "gyan",
"family_id": "urn:newsml:localhost:2018-09-18T12:24:12.433147:c287623f-c8c3-4fcb-9af9-1cbb3bbe4902",
"firstcreated": "2018-09-18T06:54:12+00:00",
"meta": {},
"particular_type": "item",
"state": "draft",
"unique_name": "#1107",
"operation": "create",
"_created": "2018-09-18T06:54:12+00:00",
"urgency": 3,
"priority": 3,
"_updated": "2018-09-18T06:54:12+00:00",
"version_creator": "",
"pubstatus": "usable",
"schedule_settings": {
"utc_embargo": null,
"time_zone": null
},
"event_id": "tag:localhost:2018:4c380f52-17f5-4651-bfc3-486eefbe7112",
"format": "HTML",
"language": "en",
"text": "test",
"genre": [
{
"qcode": "Article",
"name": "Article (news)"
}
],
"group_type": "default",
"guid": "urn:newsml:localhost:2018-09-18T12:24:12.433147:c287623f-c8c3-4fcb-9af9-1cbb3bbe4902",
"blog": "5b9f846f6281bb4408ad4948",
"versioncreated": "2018-09-18T06:54:12+00:00",
"source": "Liveblog"
}
}
]
}
],
"unique_id": 1108,
"flags": {
"marked_archived_only": false,
"marked_for_legal": false,
"marked_for_not_publication": false,
"marked_for_sms": false
},
"sticky": false,
"lb_highlight": false,
"_etag": "a991a9ed96bdfa56d3b0992c59eba7b5eb59ee2a",
"deleted": false,
"post_status": "comment",
"type": "composite",
"family_id": "urn:newsml:localhost:2018-09-18T12:24:12.607966:e912259a-e537-4321-9ca7-6fb9bb0d56b3",
"original_creator": "",
"firstcreated": "2018-09-18T06:54:12+00:00",
"order": 13.0,
"particular_type": "post",
"state": "draft",
"unique_name": "#1108",
"operation": "create",
"_created": "2018-09-18T06:54:12+00:00",
"urgency": 3,
"priority": 3,
"_updated": "2018-09-18T06:54:12+00:00",
"version_creator": "",
"pubstatus": "usable",
"schedule_settings": {
"utc_embargo": null,
"time_zone": null
},
"event_id": "tag:localhost:2018:c6df0a4f-0e30-47f2-85b4-4cf0eea6a3f5",
"format": "HTML",
"language": "en",
"genre": [
{
"qcode": "Article",
"name": "Article (news)"
}
],
"guid": "urn:newsml:localhost:2018-09-18T12:24:12.607966:e912259a-e537-4321-9ca7-6fb9bb0d56b3",
"blog": "5b9f846f6281bb4408ad4948",
"versioncreated": "2018-09-18T06:54:12+00:00",
"source": "Liveblog"
}
+ Response 400 (application/json)
{
"_issues": "Allowed length: between 1 and 300. You exceeded the allowed length",
"_message": "",
"_status": "ERR"
}

0 comments on commit 87aec1d

Please sign in to comment.
You can’t perform that action at this time.