_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

ParameterRequiredtypeDescription
articleGUIDyesstringGUID of the article
paramsnoobjectAn associative array.

Params Details

ElementRequiredDescription
statusnoStatus of the article. It could be 'draft', 'inactive' or 'published'
typenoType of article. It could be 'article' or 'event'.
blogIdnoBlog 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

AttributeDescription
idID of the article
guidGUID of the article
titleTitle of the article
slugslug of the article
excerptshort description of the article
contentfull description of the article
urlabsolute url of the article
shortUrlshort url of the article
externalUrlexternal url of the article
typetype of the article
sourcesource of the article from where it has been created
isPromotedwhether the article is promoted or not
publishedAtpublished date of the article in unix timestamp
publishedDatepublished date of the article in human readable form
statusstatus of the article
updatedAtupdated date of the article in readable form
openGraphMediaIdID of the open graph image of the article
readingTimereading time of the article in minutes
labelblog title of the article
metaMeta details of the article
opengraphOpengraph details of the article
createdByDetails of the owner of the article
blogblog details of the article
totalArticle Details
shareCountSocial media share count
mediaArticle media details
articleLayoutFileNamename of the layout of the article

Meta Details

AttributeDescription
titlemeta title of the article
keywordsmeta keywords of the article,
descriptionmeta description of the article

Opengraph Details

AttributeDescription
titleOpengraph title
dsecriptionOpengraph description

Owner Details

AttributeDescription
idid of the owner user
usernameusername of the owner
displayNamedisplay name of the owner
mediaowner profile image
coauthorsaritcle coauthor details

Media Details

AttributeDescription
idCloudinary cloud id of the image
cloudNameCloudinary cloud name
pathCloudinary cloud path of the image

Coauthor Details

idid of the coauthor user
usernameusername of the coauthor user
biobio description of the coauthor
displayNamedisplay name of the coauthor
orderthe position the the coauthor should appear on the page
mediacoauthor profile image

Blog Details

AttributeDescription
titlename of the blog
idid of the blog
guidguid of the blog
urlabsolute url of the blog
mediablog image details

Article Details

AttributeDescription
viewtotal views of the article
sharetotal shares of the article
liketotal likes of the article
commenttotal comments of the article

Social Details

AttributeDescription
facebookFacebook share count of the article
googleplusGoogle+ share count of the article
linkedinLinkedIn share count of the article
stumbleuponStumble Upon share count of the article

Article Media Details

AttributeDescription
guidguid of the media
heightheight of the media
widthwidth of the media
idCloudinary cloud id of the media
typetype of media
cloudNameCloudinary cloud name
pathCloudinary cloud path of the media
captioncaption of the media
isSystemVideoif the video is system uploaded or social media video