_Article.getArticle(articleGUID, params)
Function to get article details.
Example Usage
{% set article = _Article.getArticle('d2c5396d-7741-4449-9d24-0d33de3pp530', {"status": "published", "type": "article", "blogId": 1}) %}
Parameters
| Parameter | Required | type | Description |
|---|---|---|---|
| articleGUID | yes | string | GUID of the article |
| params | no | object | An associative array. |
Params Details
| Element | Required | Description |
|---|---|---|
| status | no | Status of the article. It could be 'draft', 'inactive' or 'published' |
| type | no | Type of article. It could be 'article' or 'event'. |
| blogId | no | Blog ID of the article |
Response Example
{
"id": "290",
"guid": "d2c5396d-7741-4449-9d24-0d33de3pp530",
"title": "title of the article",
"slug": "title-of-the-article",
"excerpt": "article short description..",
"content": "article full description",
"url": "http://cognitives.io/2016/10/18/61/article-absolute-url",
"shortUrl": "https://goo.gl/4lp2pL",
"externalUrl": null,
"type": "article",
"source": "system",
"isPromoted": "No",
"publishedAt": "1480045620",
"publishedDate": "Nov 25 2016",
"status": "published",
"updatedAt": "Nov 28 2016",
"openGraphMediaId": null,
"readingTime": "2",
"label": "Wedding Groups",
"meta": {
"title": null,
"keywords": null,
"description": null
},
"opengraph": {
"title": null,
"description": null
},
"createdBy": {
"id": "1",
"username": "admin",
"displayName": "admin",
"media": {
"id": "mt0jr5y3xvvm6yxgjpor",
"cloudName": "cognitives",
"path": "http://res.cloudinary.com/cognitives/image/upload/v1479377416/mt0jr5y3xvvm6yxgjpor.jpg"
},
"coauthors": [
{
"id": 298,
"guid": "532b5c3a-5a2f-4131-9292-7cf468abdfed",
"bio": "coauthor 1",
"username": "sample author 1",
"displayName": "sample author",
"order": 1,
"media": {
"id": "e8u2jhu0nou7p7q0joec",
"cloudName": "cognitives",
"path": "https://res.cloudinary.com/cognitives/image/upload/v1491283200/e8u2jhu0nou7p7q0joec.png"
}
},
{
"id": 299,
"guid": "d1cd26cc-da87-4510-a4b8-1aabcf873719",
"bio": "",
"username": "coauthor 2",
"displayName": "sample author 2",
"order": 2,
"media": {
"id": "akegwxylqswycccw7jrv",
"cloudName": "cognitives",
"path": "https://res.cloudinary.com/cognitives/image/upload/v1491283336/akegwxylqswycccw7jrv.jpg"
}
}
]
}
},
"blog": {
"title": "Wedding Groups",
"id": "1",
"guid": "d2c5396d-7741-4449-9d24-0d33de3sd530",
"url": "http://cognitives.io/@degitalws",
"media": {
"thumb": {
"id": "cxkdrdddbn6ckezkrp41",
"cloudName": "cognitives",
"path": "http://res.cloudinary.com/cognitives/image/upload/v1470038651/cxkdrdddbn6ckezkrp41.png"
}
}
},
"total": {
"view": "0",
"share": "0",
"like": "0",
"comment": "1"
},
"shareCount": {
"facebook": null,
"googleplus": null,
"linkedin": null,
"stumbleupon": null
},
"media": [
{
"guid": "23d8d9be-6808-495f-828f-e3402c398c08",
"height": "415",
"width": "594",
"id": "lbgfxbggj8x2rxjfcj41",
"type": "image",
"cloudName": "cognitives",
"path": "http://res.cloudinary.com/cognitives/image/upload/c_fill,dpr_auto,g_face,h_600,w_1350/lbgfxbggj8x2rxjfcj41",
"caption": null,
"isSystemVideo": false
}
],
"articleLayoutFileName": null
}
Response Description
| Attribute | Description |
|---|---|
| id | ID of the article |
| guid | GUID of the article |
| title | Title of the article |
| slug | slug of the article |
| excerpt | short description of the article |
| content | full description of the article |
| url | absolute url of the article |
| shortUrl | short url of the article |
| externalUrl | external url of the article |
| type | type of the article |
| source | source of the article from where it has been created |
| isPromoted | whether the article is promoted or not |
| publishedAt | published date of the article in unix timestamp |
| publishedDate | published date of the article in human readable form |
| status | status of the article |
| updatedAt | updated date of the article in readable form |
| openGraphMediaId | ID of the open graph image of the article |
| readingTime | reading time of the article in minutes |
| label | blog title of the article |
| meta | Meta details of the article |
| opengraph | Opengraph details of the article |
| createdBy | Details of the owner of the article |
| blog | blog details of the article |
| total | Article Details |
| shareCount | Social media share count |
| media | Article media details |
| articleLayoutFileName | name of the layout of the article |
Meta Details
| Attribute | Description |
|---|---|
| title | meta title of the article |
| keywords | meta keywords of the article, |
| description | meta description of the article |
Opengraph Details
| Attribute | Description |
|---|---|
| title | Opengraph title |
| dsecription | Opengraph description |
Owner Details
| Attribute | Description |
|---|---|
| id | id of the owner user |
| username | username of the owner |
| displayName | display name of the owner |
| media | owner profile image |
| coauthors | aritcle coauthor details |
Media Details
| Attribute | Description |
|---|---|
| id | Cloudinary cloud id of the image |
| cloudName | Cloudinary cloud name |
| path | Cloudinary cloud path of the image |
Coauthor Details
| id | id of the coauthor user |
| username | username of the coauthor user |
| bio | bio description of the coauthor |
| displayName | display name of the coauthor |
| order | the position the the coauthor should appear on the page |
| media | coauthor profile image |
Blog Details
| Attribute | Description |
|---|---|
| title | name of the blog |
| id | id of the blog |
| guid | guid of the blog |
| url | absolute url of the blog |
| media | blog image details |
Article Details
| Attribute | Description |
|---|---|
| view | total views of the article |
| share | total shares of the article |
| like | total likes of the article |
| comment | total comments of the article |
Social Details
| Attribute | Description |
|---|---|
| Facebook share count of the article | |
| googleplus | Google+ share count of the article |
| LinkedIn share count of the article | |
| stumbleupon | Stumble Upon share count of the article |
Article Media Details
| Attribute | Description |
|---|---|
| guid | guid of the media |
| height | height of the media |
| width | width of the media |
| id | Cloudinary cloud id of the media |
| type | type of media |
| cloudName | Cloudinary cloud name |
| path | Cloudinary cloud path of the media |
| caption | caption of the media |
| isSystemVideo | if the video is system uploaded or social media video |
Updated over 8 years ago
