FMLDevelopers

Stories

List story statuses

GET/article/status/listAPI key only

Returns uid/label pairs: 0 new (awaiting community moderation), 1 rejected, 2 promoted, 3 refused, 4 validated (published), 5 private, 6 autopilot, 7 deleted, 8 scheduled, 9 tocheck, 10 BestOfPire, 11 Check Edito (awaiting editorial review), 12 republished.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/status/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": {
    "0": "new",
    "1": "rejected",
    "2": "promoted",
    "3": "refused",
    "4": "validated",
    "5": "private",
    "6": "autopilot",
    "7": "deleted",
    "8": "scheduled",
    "9": "tocheck"
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List story types

GET/article/type/listAPI key only

Returns uid/label pairs, for example 1 classic, 3 photo, 6 confession, 9 news, 10 video, 16 contest.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/type/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "1": "classic",
  "4": "histo",
  "5": "world",
  "6": "confession",
  "7": "illustrated",
}

Example from the original docs: values are made up and some fields may have changed.

Possible errors

401

{
  "error": "102 - Invalid API key."
}

ERROR CODE: 500 (INTERNAL SERVER ERROR)
Content:
{
  "error": "Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List author genders

GET/article/gender/listAPI key only

Returns uid/label pairs: 1 man, 2 woman, 3 Other, 4 Enby, 5 TransFem, 6 TransMasc. Use the uid as gender when submitting a story.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/gender/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": {
    "1": "male",
    "2": "female"
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List vote types

GET/article/votetype/listAPI key only

Returns uid/label pairs (translated labels) for the vote buttons. Use the uid with /article/{article}/vote/{votetype}.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/votetype/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": {
    "1": "vote type 1",
    "2": "vote type 2",
    "3": "vote type 3"
  },
  "meta": {}
}

Example from the original docs: values are made up and some fields may have changed.

Possible errors

401

{
  "error": "102 - Invalid API key."
}

ERROR CODE: 500 (INTERNAL SERVER ERROR)
Content:
{
  "error": "Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List categories

GET/article/category/listAPI key only

Returns the current site's categories, sorted by name, as uid, label and rub (always true). Use a uid as keyword[] in /article/list.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/category/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": {
    "1": "Amour",
    "2": "Travail",
    "3": "Argent",
    "4": "Sexe",
    "5": "Animaux",
    "6": "Enfants",
    "7": "Santé",
    "8": "Transport",
    "9": "Vacances",
    "10": "Geek",
    "11": "Inclassable"
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List smileys

GET/article/smiley/listAPI key only

Returns uid/label pairs: 1 amusing, 2 funny, 3 weird, 4 hilarious. Use the uid with /article/{article}/smile/{smiley}.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/smiley/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": {
    "1": "amusing",
    "2": "funny",
    "3": "weird",
    "4": "hilarious"
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

Submit a story

POST/articleAPI key only

The story is created with status 11 (Check Edito): the editorial team reviews it before it goes to moderation or publication. It's linked to the authenticated member, if any. Content must be 20 to 320 characters long; surrounding double quotes are removed. Returns the story (201), or 400 if the content is too short or too long, or if a contest entry has no email. Any other field sent is ignored.

Parameters

contentoptional
string, required in practice — the story's text, 20 to 320 characters
authoroptional
string, optional — author name displayed with the story
emailoptional
string, optional — author's email address; required for a contest entry
typeoptional
integer, default 1 (classic) — story type: 1 (classic), 3 (photo), 6 (confession), 15 (medics) or 16 (contest); any other value gives 1
spicyoptional
boolean, default false — the story is spicy (adult content)
contestoptional
boolean, default false — contest entry: sets the type to 16 (contest) and makes email required
optinoptional
boolean, default false — opt-in flag
titleoptional
string, optional — title
genderoptional
integer, optional — author's gender, see /article/gender/list
Request
curl -X POST "https://www.fmylife.com/api/v2/article" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 201
{
  "data": {
    "id": 24,
    "status": 4,
    "type": 1,
    "spicy": true,
    "title": "Hello hello",
    "content": "Article content Article content  Article content  Article content  Article content  Article content  Article content  Article content  Article content  Article content ",
    "created": "2016-09-16T09:15:57+02:00",
    "updated": "2016-09-16T09:15:57+02:00",
    "published": "2016-09-16T09:15:57+02:00",
    "user": 1474009731,
    "author": "Cédric",
    "gender": 1,
    "layout": 3,
    "flag": 2,
    "origin": "api",
    "apikey": "4dccf019bdfac",
    "vote": 1,
    "site": 1,
    "siteorig": null,
    "ip": null,
    "city": null,
    "country": null,
    "countrycode": null,
    "area": null,
    "slug": "hello-hello",
    "bitly": "http://bit.ly/2ce7n5T"
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

400

{
  "error": "No article content provided."
}

400

{
  "error": "Article content must be between 20 and 300 characters long."
}}

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
Request
curl "https://www.fmylife.com/api/v2/article/{article}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "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>&nbsp;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."
}

Moderate a pending story

GET/article/{article}/moderate/{mod}API key only

Community moderation: {mod} is 1 (yes, it's an FML) or 0 (no), default 0. Only stories with status 0 (new) can be moderated; get them with /article/list?moderate=1. Requires a user token or an X-VDM-Uniqid header (401 otherwise); one vote per voter and story (406 otherwise). Once enough yes votes are reached the story becomes promoted (2); enough no votes and it's rejected (1). Returns the story's metrics (202).

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/{article}/moderate/{mod}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 202
@TODO

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

Vote for a story

GET/article/{article}/vote/{votetype}API key only

{votetype} is optional: without it or with 0, the vote is an up vote; with an id from /article/votetype/list, it's a down vote. A user token or X-VDM-Uniqid is required (400 otherwise): one vote per voter, story and vote type (406 otherwise). Send the same request with the DELETE method to withdraw a vote. Returns the story's metrics (202).

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/{article}/vote/{votetype}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 202
{
  "data": {
    "article": 5,
    "comment": 0,
    "favorite": 0,
    "reports": 0,
    "mod_positive": 0,
    "mod_negative": 0,
    "votes_up": 6,
    "votes_down": 0,
    "smiley_amusing": 0,
    "smiley_funny": 0,
    "smiley_weird": 0,
    "smiley_hilarious": 0
  },
  "meta": {}
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

406

{
  "error": "Provided vote type is invalid"
}

406

{
  "error": "Article already voted"
}

Report a story

PATCH/article/{article}/reportAPI key only

A user token or X-VDM-Uniqid is required (400 otherwise). One report per voter and story: later calls change nothing. Returns the story's metrics (202), 404 if the story doesn't exist.

Parameters

No parameters.

Request
curl -X PATCH "https://www.fmylife.com/api/v2/article/{article}/report" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 202
@TODO

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

React to a story with a smiley

GET/article/{article}/smile/{smiley}Member token required

Works with a user token or an X-VDM-Uniqid header (401 without either). Smiley ids come from /article/smiley/list. One reaction per voter, story and smiley (406 otherwise). Returns the new count for this smiley (202).

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/{article}/smile/{smiley}" \
  -H "X-VDM-Api-Key: $API_KEY" \
  -H "X-VDM-Api-Token: $TOKEN"
Response 202
@TODO

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

208

{
  "error": "Article already voted"
}

Add a story to favorites, or remove it

PATCH/article/{article}/bookmarkMember token required

Toggle: the first call adds the story to the member's favorites, the next one removes it. Requires a user token. Returns 202. List favorites with /user/{userid}/favorites.

Parameters

No parameters.

Request
curl -X PATCH "https://www.fmylife.com/api/v2/article/{article}/bookmark" \
  -H "X-VDM-Api-Key: $API_KEY" \
  -H "X-VDM-Api-Token: $TOKEN"
Response 202
@TODO

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

404

{
  "error": "Article not found."
}

List a story's comments

GET/article/{article}/commentsAPI key only

Paginated (meta). By default, top-level comments in every status except deleted. Returns an empty list when comments are closed on the story. When authenticated, comments from your blocked contacts are removed and your thumbs are included.

Parameters

statusoptional
array of integers, optional — comment statuses to include: 0 default, 1 highlighted, 2 nuked, 3 confession, 5 forbidden keywords, 6 auto-nuked; default: all except 4 (deleted)
authoroptional
array of integers, optional — only comments by these member ids
parentoptional
array of integers, optional — only replies to these comment ids (e.g. parent[]=123)
reportedoptional
boolean, default false — only comments reported as abuse beyond the site's threshold
repliesoptional
boolean, default false — include each comment's replies in its replies property
flatoptional
boolean, default false — return comments and replies together in a single flat list
pageoptional
array — pagination: page[number] (page number, default 1) and page[bypage] (items per page, default 30)
orderbyoptional
array, optional — sort order, as orderby[field]=ASC|DESC; no particular order by default
Request
curl "https://www.fmylife.com/api/v2/article/{article}/comments" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [
    {
      "id": 3,
      "date": "2016-10-29T13:09:05+02:00",
      "status": 0,
      "parent": 1,
      "content": "Deuxième Réponse au commentaire n°1",
      "article": 5,
      "author": 4294967295,
      "thumbup": 1564,
      "thumbdown": 1,
      "report": 0,
      "ip": null,
      "replies": null
    },
    {
      "id": 4,
      "date": "2016-10-29T13:09:05+02:00",
      "status": 0,
      "parent": 0,
      "content": "Et voici un commentaire !",
      "article": 5,
      "author": 4294967295,
      "thumbup": 14,
      "thumbdown": 12,
      "report": 0,
      "ip": null,
      "replies": null
    },
    {
      "id": 1,
      "date": "2016-10-29T13:09:05+02:00",
      "status": 0,
      "parent": 0,
      "content": "Et voici un commentaire !",
      "article": 5,
      "author": 4294967295,
      "thumbup": 5,
      "thumbdown": 8,
      "report": 0,
      "ip": null,
      "replies": null
    },
    {
      "id": 2,
      "date": "2016-10-29T13:09:05+02:00",
      "status": 0,
      "parent": 1,
      "content": "Première réponse au commentaire n°1",
      "article": 5,
      "author": 4294967295,
      "thumbup": 1,
      "thumbdown": 2,
      "report": 0,
      "ip": null,
      "replies": null
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 10,
    "page_count": 1,
    "total_count": 4
  }
}

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: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
}

List stories

GET/article/listAPI key only

Paginated (meta). By default, the current site's published stories (status 4), newest first. Results may be cached for up to an hour. Each story has a url to its web page; with a user token or X-VDM-Uniqid, your votes, smileys and favorites are included. type[]=12 on its own returns the “almost” stories (refused ones). Example: /article/list?status[]=4&type[]=1&page[number]=1&page[bypage]=10&orderby[datePublish]=desc.

Parameters

siteoptional
Ignored: always the current site
moderateoptional
boolean, default false — return the next stories you can moderate (status 0 stories you haven't voted on), see /article/{article}/moderate/{mod}
spicyoptional
boolean, default false — only spicy stories
nospicyoptional
boolean, default false — exclude spicy stories
reportedoptional
boolean, default false — only stories reported at least once
useroptional
integer, optional — only stories by this member id
countryoptional
array of strings, optional — only stories from these countries (ISO codes)
typeoptional
array of integers, optional — only these types, see /article/type/list
statusoptional
array of integers, default [4] (validated) — only these statuses, see /article/status/list; statuses 5 (private), 7 (deleted) and 8 (scheduled) are ignored, except for the site's staff
keywordoptional
array of integers, optional — only stories linked to these keyword ids, see /article/category/list
afteroptional
string YYYY-MM-DD HH:mm:ss, optional — only stories published after this date
beforeoptional
Currently ignored by the API (only stories published before this date)
created_afteroptional
string YYYY-MM-DD HH:mm:ss, optional — only stories created after this date
created_beforeoptional
string YYYY-MM-DD HH:mm:ss, optional — only stories created before this date
exproptional
string, optional — text to search for in the title and content; a number matches the story id
pageoptional
array — pagination: page[number] (page number, default 1) and page[bypage] (items per page, default 30)
orderbyoptional
array, default orderby[datePublish]=DESC — sort order, as orderby[field]=ASC|DESC; only column names are accepted
Request
curl "https://www.fmylife.com/api/v2/article/list" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [
    {
      "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-10-29T13:09:04+02:00",
      "updated": "2016-10-29T13:09:04+02:00",
      "published": "2016-05-11T13:09:04+02:00",
      "user": 2321654987,
      "author": null,
      "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": "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": [],
      "openview": 0           # 0: native, 1: webview
    },
    {
      "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": 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": [
        {
          "uid": 12,
          "label": "L'actualité VDM",
          "rub": true
        }
      ],
      "openview": 0           # 0: native, 1: webview
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 6,
    "page_count": 98,
    "total_count": 586
  }
}

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()"
}

Search stories for autocomplete

GET/article/list/short/{expr}API key only

Requires a user token. Returns up to 10 published stories matching {expr} (in the title or content, or the exact id if it's a number), as id/title pairs; when a story has no title, the beginning of its content is used.

Parameters

No parameters.

Request
curl "https://www.fmylife.com/api/v2/article/list/short/{expr}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
@TODO

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()"
}

List top stories

GET/article/top/{period}API key only

Published stories sorted by number of votes (up and down), paginated (meta). Use /article/top for all time or /article/top/{period}. With a user token or X-VDM-Uniqid, your votes, smileys and favorites are included.

Parameters

periodoptionalin the pathformat (\w+)?
string, in the path, default top — top (all time), top_day, top_week, top_month or top_year (stories published in the last day, week, month or year); any other value means all time
pageoptional
array — pagination: page[number] (page number, default 1) and page[bypage] (items per page, default 30)
Request
curl "https://www.fmylife.com/api/v2/article/top/{period}" \
  -H "X-VDM-Api-Key: $API_KEY"
Response 200
{
  "data": [
    {
      "id": 8,
      "status": 4,
      "type": 1,
      "spicy": false,
      "title": null,
      "content": "Aujourd'hui, le grand patron du supermarché dans lequel je travaille est venu nous rendre visite.",
      "created": "2017-01-12T17:24:41+01:00",
      "updated": "2017-01-18T10:51:29+01:00",
      "published": "2016-05-12T17:24:41+02:00",
      "user": 4294967291,
      "author": null,
      "gender": null,
      "layout": 0,
      "flag": 0,
      "origin": null,
      "apikey": null,
      "vote": 2,
      "site": 1,
      "siteorig": null,
      "ip": null,
      "city": null,
      "country": null,
      "countrycode": null,
      "area": null,
      "slug": "aujourd-hui-le-grand-patron-du-supermarche-dans-lequel-je-travaille-est-venu-nous-rendre-visite-i",
      "bitly": null,
      "metrics": {
        "article": 8,
        "comment": 2,
        "favorite": 1,
        "reports": 0,
        "mod_positive": 0,
        "mod_negative": 0,
        "votes_up": 0,
        "votes_down": 2,
        "smiley_amusing": 1,
        "smiley_funny": 1,
        "smiley_weird": 0,
        "smiley_hilarious": 0
      },
      "usermetrics": {
        "favorite": false,
        "smiley": null,
        "votes": null
      },
      "keywords": [],
      "images": [],
      "videos": []
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "page_count": 7,
    "total_count": 7
  },
  "badge": []
}

Example from the original docs: values are made up and some fields may have changed.

Possible errors

401

{
  "error": "102 - Invalid API key."
}

401

{
  "error": "104 - Invalid or expired API token."
}