Get a story by id
GET/article/{article}API key only
Includes keywords, metrics, images, videos, paragraphs and up to 10 suggested stories, plus your votes, smileys and favorite status when a user token or X-VDM-Uniqid is sent. Paragraphs come in a paragraphs array of objects with a type and a content: html (HTML text) or article (an embedded story, in the same format as /article/list). Promoted and refused stories are returned with type 12 (almost). Returns 404 if the story doesn't exist. Private, deleted or scheduled stories also return 404, except for their author and the site's staff.
Parameters
articleoptionalin the pathformat\d+- integer, in the path — story id
curl "https://www.fmylife.com/api/v2/article/{article}" \
-H "X-VDM-Api-Key: $API_KEY"{
"data": {
"id": 211,
"status": 4,
"type": 2,
"spicy": false,
"title": "La boutique VDM fait son come back",
"content": "Certains d'entre vous ont connu la première version de la boutique VDM de mars, où nous avions vendu notre premier modèle désormais collector (tirage 50 exemplaires !) du t-shirt \"Aujourd'hui, je n'avais rien à me mettre\". Aujourd'hui, et pour...",
"created": "2008-04-28T23:00:16+02:00",
"updated": "2016-10-29T13:09:52+02:00",
"published": "2008-04-28T23:00:16+02:00",
"user": 43,
"author": "Maxime",
"gender": null,
"layout": null,
"flag": null,
"origin": null,
"apikey": null,
"vote": 1,
"site": 1,
"siteorig": null,
"ip": null,
"city": null,
"country": null,
"countrycode": null,
"area": null,
"slug": "la-boutique-vdm-fait-son-come-back",
"bitly": null,
"metrics": {
"article": 211,
"comment": 172,
"favorite": 0,
"reports": 0,
"mod_positive": 0,
"mod_negative": 0,
"votes_up": 0,
"votes_down": 0,
"smiley_amusing": 0,
"smiley_funny": 0,
"smiley_weird": 0,
"smiley_hilarious": 0
},
"usermetrics": {
"favorite": false,
"smiley": null,
"votes": null
},
"keywords": [
{
"uid": 12,
"label": "L'actualité VDM",
"rub": false
}
],
"openview": 0 # 0: native, 1: webview
"images": [
{
"url": "http://reboot.viedemerde.fr/img/2a0ae715b8212ec000ea96963ba3d63f.jpeg/original/",
"usage": null,
"name": "2a0ae715b8212ec000ea96963ba3d63f.jpeg",
"copyright": null,
"legend": null
},
{
"url": "http://reboot.viedemerde.fr/img/47efcc7df9c8b904b66021c66b1b42e6.jpeg/original/",
"usage": null,
"name": "47efcc7df9c8b904b66021c66b1b42e6.jpeg",
"copyright": null,
"legend": null
},
{
"url": "http://reboot.viedemerde.fr/img/76afaa941a453f956e50ade276d89cb9.jpeg/original/",
"usage": null,
"name": "76afaa941a453f956e50ade276d89cb9.jpeg",
"copyright": null,
"legend": null
}
],
"paragraphs": [
{
"type": "html",
"id": "1",
"content": "<p> sgg sdgs dfsdfg sdgsdf<strong>gs gsdfg sdfg</strong></p>"
},
{
"type": "article",
"id": 2,
"content": {
"id": 2,
"status": 4,
"type": 2,
"spicy": true,
"title": "Mariage de son ex",
"content": "Aujourd'hui, ma petite amie m'envoie des photos d'un mariage qu'elle a vu sur Facebook : \"C'est magnifique et trop beau.\" Il s'agit du mariage de mon ex. VDM",
"created": "2016-12-20T11:20:02+01:00",
"updated": "2016-12-20T11:20:02+01:00",
"published": "2016-12-20T11:16:49+01:00",
"user": 2321654987,
"author": null,
"gender": null,
"layout": 0,
"flag": 0,
"origin": null,
"apikey": null,
"vote": 1,
"site": 1,
"siteorig": null,
"ip": null,
"city": null,
"country": null,
"countrycode": null,
"area": null,
"slug": "mariage-de-son-ex",
"bitly": null,
"metrics": {
"article": 0,
"comment": 0,
"favorite": 0,
"reports": 0,
"mod_positive": 0,
"mod_negative": 0,
"votes_up": 0,
"votes_down": 0,
"smiley_amusing": 0,
"smiley_funny": 0,
"smiley_weird": 0,
"smiley_hilarious": 0
},
"usermetrics": {
"favorite": false,
"smiley": null,
"votes": null
},
"keywords": [],
"images": []
}
}
]
},
"meta": {},
"badge": [
{
"id": 1,
"site": null,
"name": "Débutant",
"description": "Vous avez parcouru 5 pages du site. C'est un début.",
"hidden": false,
"goal": 5,
"limited": false,
"category": "1",
"total": 7565825,
"illustration": "lI6nHr5hWXlu0.gif"
}
]
}Example from the original docs: values are made up and some fields may have changed.
Possible errors
401
{
"error": "102 - Invalid API key."
}500
{
"error": "Warning: Invalid argument supplied for foreach()"
}404
{
"error": "Article not found."
}