EG Digital API : Documentation


Description

An API (Application Programming Interface) is a standardized set of classes and methods for interacting with a web service such as ours, through any programming language. This is a RESTful API, that allows you to manipulate Infoconcert.com's datas to integrate them into your own application or website.
You can use our API to display, for example, the concerts of the day in your department, display a list of concerts of an artist, display the upcoming festivals of the week, etc.
This API was built with love by developers for developers.


Change logs


2017-02-28:
- add weather
- add traffic

2017-02-17:
- create "podcast" object, "son" is now only for sounds which are not podcast
- son_by_show is now deprecated and replaced by podcast_by_category
- modification in history: now it's history/{webradio_id}/{date}/{hour}/{user_id} instead of history/{playlist_id}/{date}/{hour}/{user_id}. You get webradio_id from webradio object.

2017-01-01:
- create "event" objet which replaced "agenda"
- "agenda" is now deprecated


Requirements


To use this API you must request an access to have your public and private keys.


Root of API


http://www.thedomain.fr/api/ (where www.thedomain.fr is the url of the website concerned.)

Examples :
- http://generations.fr/api/
- http://www.jazzradio.fr/api/
- http://mfmradio.fr/api/
- http://alpesdusud.alpes1.com/api/


Authentication


Our API supports 2 ways for authentication:

 - You can use HMAC authentication (keyed-hash message authentication code).
 - You can use JSON Web Tokens



HMAC

Example: in PHP
	          
$root_api = 'http://thedomain.fr/api/';

// Your Public/Private Keys
$public_key = 'insert your public key here';
$private_key = 'insert your private key here';

// Request to be submitted
$request = 'news';

$time = time();

// Generate content verification signature
$sig = base64_encode(hash_hmac('sha1', $request.$time, $private_key, TRUE));

// Finally submit to api end point

$headers = array(
  'X-Public-Key: ' . $public_key,
  'X-Request-Hash: ' . $sig,
  'X-Request-Timestamp: ' . $time,
  'Content-Type: application/json; charset=utf-8' // required in every request
);

// Request
$ch = curl_init($root_api . $request);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, FALSE); // Includes the header in the output
$result = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Show result
echo $result;
	          
          


JSON Web Tokens

JSON Web Tokens (JWT), pronounced "jot", are a standard since the information they carry is transmitted via JSON. We can read more about the draft, but that explanation isn’t the most pretty to look at.
You can have more information on this tutorial.
You can find some librairies here.


Example of header:
	          
{
  "typ": "JWT",
  "alg": "HS256"
}

	          
          

Example of payload:
	          
{
  "sub": "news", // The URI/Request you want to call
  "iat": 1437555859, // "Now" in Unix Time
  "public_key": "insert your public key here"
}

	          
          

Example of signature:
	          
var encodedString = base64UrlEncode(header) + "." + base64UrlEncode(payload);

HMACSHA256(encodedString, 'insert your private key here');

	          
          

Example of full JSON Web Token:
	          
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWUiOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20154d094b229f75773

	          
          

You have to used your JSON Web Tokens inside HTTP header like this:
X-JWT: 'your JSON Web Token'
X-Public-Key: 'insert your public key here'


Example in PHP:
	          
$ch = curl_init('http://thedomain.fr/api/news');
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                                    		'X-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzY290Y2guaW8iLCJleHAiOjEzMDA4MTkzODAsIm5hbWUiOiJDaHJpcyBTZXZpbGxlamEiLCJhZG1pbiI6dHJ1ZX0.03f329983b86f7d9a9f5fef85305880101d5e302afafa20154d094b229f75773',
                                    		'X-Public-Key: 450b1777c3b5e6662e30c61023e7fb61e44631226eb1f69b9e50f20486f66f6e',
                                    		'Content-Type: application/json; charset=utf-8'
                                    		));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
$result = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

header('Content-Type: application/json; charset=UTF-8');
echo $result;

	          
          

Webviews

Some calls can be passed to display directly webviews, for articles or events for example.

article/{id}

One news details can be called in webview like this: article/{id}

Example: GET article/23456

event_article/{id}

One event details can be called in webview like this: event_article/{id}

Example: GET event_article/45678

Object: Slider

To recover slider.

slider/{limit}

To get slider.
{limit} is optional (default: 5)

Example: GET slider
			
{
    "content": [
        {
            "id": "51375",
            "type": "slider",
            "category": null,
            "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit !",
            "subtitle": "0",
            "text": null,
            "slug": "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit",
            "url": "http://thedomain/news/category/51375/lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit",
            "api_url": "news/category/51375",
            "picture": "870x489_2299160610_15282bd223_b.jpg",
            "hits": null,
            "hits_today": null,
            "hits_yesterday": null,
            "hits_reset": null,
            "start_date": "2016-06-16 17:00:00",
            "end_date": null,
            "allow_comments": null,
            "published": "1",
            "hide_ads": "0",
            "in_timeline": "0",
            "created_at": "2016-06-16 17:47:34",
            "updated_at": null,
            "start_date_short": "2016-06-16",
            "comments": [],
            "tags": [],
            "files": [],
            "media_url": "http://thedomain.com/media/slider/"
        },
        {...}
}
			
		 


Object: News

To recover last news.

Structure

News calls are structured like this: news/{category}/{id}/{page}
First page is always: 0. Then 1, 2, 3, etc.

Example: GET news

news

To get 20 last news.

Example: GET news
			
 {
    "type": "news",
    "media_url": "http://thedomain.fr/media/news/",
    "category": "",
    "total_rows": 6938,
    "per_page": 20,
    "page": 0,
    "hot": [
        {
            "id": "32762",
            "type": "news",
            "category": "coulisse",
            "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit !",
            "subtitle": "Suspendisse bibendum efficitur lectus eget maximus. Proin ultrices sollicitudin nulla eu commodo. Sed lobortis volutpat tempus. Proin quis tincidunt dolor, et euismod mauris. Nunc mollis pulvinar nisi quis pretium.",
            "text": "

\"\"
\n
\nFusce dapibus tellus et ligula euismod, a mattis magna eleifend. Sed pellentesque mollis sapien, eget gravida magna posuere id. Praesent scelerisque massa id egestas faucibus. Quisque aliquam aliquet lacus, nec efficitur sapien vestibulum vel. Sed dictum eget nunc ut convallis. Quisque id volutpat purus. Vivamus porttitor felis magna, in tempus ipsum laoreet a.

", "slug": "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit", "picture": "picture.jpg", "hits": "17187", "hits_today": "3908", "hits_yesterday": "13075", "hits_reset": "2015-07-16", "start_date": "2015-07-15 05:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 11:30:55", "updated_at": "2015-07-16 13:30:04", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247298", "type_id": "32762", "type": "news", "reply_to": null, "approved": "1", "user_id": "28185", "username": "adipiscing", "text": "Donec posuere nisl massa, vitae suscipit nisl mattis in. Phasellus fermentum massa accumsan velit molestie tincidunt. Duis interdum nunc sed nunc varius pulvinar. Donec vel cursus justo. Curabitur condimentum sit amet diam at hendrerit. In convallis congue massa et luctus.", "agree": "0", "disagree": "0", "published": "1", "created_at": "2015-07-16 12:19:27", "updated_at": "0000-00-00 00:00:00", "agreed": 0, "replies": [] }, {...} ], , "tags": [ { "id": "69", "title": "Lorem", "content_id": "32762", "tag_id": "69", "created_at": "2015-07-16 07:42:26" }, { "id": "3834", "title": "ipsum", "content_id": "32762", "tag_id": "3834", "created_at": "2015-07-16 07:42:26" }, { "id": "9015", "title": "adipiscing", "content_id": "32762", "tag_id": "9015", "created_at": "2015-07-16 07:42:26" } ], "media": [ { "id": "67964", "title": "Donec posuere nisl massa", "file": "donec-posuere-nisl-massa.mp4", "type": "video", "own_player": "0", "created_at": "2015-07-15 11:25:16", "updated_at": "0000-00-00 00:00:00", "content_id": "32762", "media_id": "67964" } ] }, {...}, ], "content": [ { "id": "32767", "type": "news", "category": "coulisse", "title": "Pellentesque tempus tristique ligula in fermentum", "subtitle": "Aliquam erat volutpat. Mauris vehicula lobortis velit. Nam et nisl blandit lectus congue tempus. Vestibulum consequat lacus et eleifend efficitur.", "text": "

Morbi ut dui blandit, hendrerit felis at, fermentum odio. Morbi eu gravida eros. Suspendisse finibus nisi at elit bibendum hendrerit. Nullam consectetur et lectus at convallis. Etiam rhoncus nunc mauris, vestibulum ornare magna porttitor non.

", "slug": "pellentesque-tempus-tristique-ligula-in-fermentum", "picture": "picture2.jpg", "hits": "2504", "hits_today": "771", "hits_yesterday": "1660", "hits_reset": "2015-07-16", "start_date": "2015-07-15 09:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 15:03:56", "updated_at": "2015-07-16 13:32:46", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247226", "type_id": "32767", "type": "news", "reply_to": null, "approved": "1", "user_id": "28718", "username": "Integer", "text": "Suspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo.", "agree": "3", "disagree": "0", "published": "1", "created_at": "2015-07-15 16:56:06", "updated_at": "2015-07-16 11:29:21", "agreed": 0, "replies": [] } ], "tags": [ { "id": "202", "title": "Pellentesque", "content_id": "32767", "tag_id": "202", "created_at": "2015-07-15 15:03:56" } ], "media": [] }, {...} }

news/false/false/{page}

To get next news.

Example: GET news/false/false/1

news/{category}

To get all news filtered by category.

Example: GET news/coulisse
Example for next page: GET news/coulisse/false/1

news/{category}/{id}

To get one article.

Example: GET news/coulisse/32527

news_category

To get list of categories with id and titles

Example: GET news_category
			
{
  "type": "news_category",
  "content": {
    "1": "Politique",
    "2": "Social",
    "3": "Economie",
    "4": "Justice",
    "5": "Faits Divers",
    "6": "Santé",
    "7": "Environnement",
    "8": "Culture",
    "9": "Sport",
    "11": "High-Tech",
    "12": "Météo",
    "14": "Divers",
    "15": "OL",
    "16": "ASVEL",
    "18": "Transport",
    "19": "LOU Rugby",
    "20": "People",
    "21": "Société",
    "47": "Education"
  },
  "media_url": "https://thedomain.fr/media/news_category/"
}
			
		 

news_locales

To get list of all locales news

Example: GET news_locales
			
{
  "type": "news",
  "media_url": "https://thedomain.fr/media/news/",
  "category": "locales",
  "page": 0,
  "per_page": 20,
  "total_rows": 99318,
  "content": [
    {
      "id": "209255",
      "type": "news",
      "category": "locales",
      "category_id": "8",
      "title": "L’artiste JR de passage à Lyon ce mercredi",
      "subtitle": "Le rendez-vous est donné sur la place Bellecour.",
      "text": "

Depuis 2011, le célèbre photographe parcourt le monde en photographiant les habitants, afin de les exposer dans les lieux publics, pour son projet Inside Out. JR poursuit son dispositif du côté de Lyon cette semaine.

\r\n\r\n

12h à 18h

\r\n\r\n

Le rendez-vous est donné sur la place Bellecour à Lyon ce mercredi, de 12h à 18h. À l’occasion du projet Inside Out, un camion Photobooth sera présent à la Fondation Bullukian, situé au 26 place Bellecour à Lyon de 12h à 18h, pour tirer les portraits des Lyonnais et des Lyonnaises volontaires. Cette œuvre collective sera par la suite affichée sur la façade de la Fondation.

\r\n\r\n

 

", "slug": "l-artiste-jr-de-passage-a-lyon-ce-mercredi", "key": "8", "picture_legend": "JR Instagram", "picture": "l-artiste-jr-de-passage-a-lyon-ce-mercredi_63bbdc2ab624b.jpg", "picture_original": "63bbdb30adb9d-307554194-944815300240815-7212742018136488924-n-1.jpg", "hits": null, "hits_today": null, "hits_yesterday": null, "hits_reset": null, "start_date": "2023-01-09 10:11:00", "end_date": "0000-00-00 00:00:00", "allow_comments": "0", "published": "1", "hide_ads": "0", "in_timeline": "0", "is_original": "1", "meta_title": null, "meta_description": null, "created_at": "2023-01-09 10:19:38", "updated_at": "2023-01-09 11:45:01", "start_date_short": "2023-01-09", "picture_width": 1280, "picture_height": 720, "picture_type": 2, "comments": [], "tags": [], "files": [], "zones": [], "media_url": "https://thedomain.fr/media/news/" }, {...}

news_locales/{news_category_id}/{id}/{page}

To get list of all locales news with filtered values

- {news_category_id}: id of the news category (method "news_category" to get the list)
- {id}: put false to have all or an id to have only the id
- {page}: begin by 0, then 1, 2, etc. (0 By default). Example: GET news_locales/2/false
			
{
  "type": "news",
  "media_url": "https://thedomain.fr/media/news/",
  "category": "locales",
  "page": 0,
  "per_page": 20,
  "total_rows": 99318,
  "content": [
    {
      "id": "209255",
      "type": "news",
      "category": "locales",
      "category_id": "2",
      "title": "L’artiste JR de passage à Lyon ce mercredi",
      "subtitle": "Le rendez-vous est donné sur la place Bellecour.",
      "text": "

Depuis 2011, le célèbre photographe parcourt le monde en photographiant les habitants, afin de les exposer dans les lieux publics, pour son projet Inside Out. JR poursuit son dispositif du côté de Lyon cette semaine.

\r\n\r\n

12h à 18h

\r\n\r\n

Le rendez-vous est donné sur la place Bellecour à Lyon ce mercredi, de 12h à 18h. À l’occasion du projet Inside Out, un camion Photobooth sera présent à la Fondation Bullukian, situé au 26 place Bellecour à Lyon de 12h à 18h, pour tirer les portraits des Lyonnais et des Lyonnaises volontaires. Cette œuvre collective sera par la suite affichée sur la façade de la Fondation.

\r\n\r\n

 

", "slug": "l-artiste-jr-de-passage-a-lyon-ce-mercredi", "key": "2", "picture_legend": "JR Instagram", "picture": "l-artiste-jr-de-passage-a-lyon-ce-mercredi_63bbdc2ab624b.jpg", "picture_original": "63bbdb30adb9d-307554194-944815300240815-7212742018136488924-n-1.jpg", "hits": null, "hits_today": null, "hits_yesterday": null, "hits_reset": null, "start_date": "2023-01-09 10:11:00", "end_date": "0000-00-00 00:00:00", "allow_comments": "0", "published": "1", "hide_ads": "0", "in_timeline": "0", "is_original": "1", "meta_title": null, "meta_description": null, "created_at": "2023-01-09 10:19:38", "updated_at": "2023-01-09 11:45:01", "start_date_short": "2023-01-09", "picture_width": 1280, "picture_height": 720, "picture_type": 2, "comments": [], "tags": [], "files": [], "zones": [], "media_url": "https://thedomain.fr/media/news/" }, {...}

Object: Video

To recover last videos.

Structure

Videos calls are structured like this: video/{category}/{id}/{page}
First page is always: 0. Then 1, 2, 3, etc.

Example: GET video

video

To get 20 last video.

Example: GET video
			
 {
    "type": "video",
    "media_url": "http://thedomain.fr/media/video/",
    "category": "",
    "total_rows": 6938,
    "per_page": 20,
    "page": 0,
    "hot": [
        {
            "id": "32762",
            "type": "video",
            "category": "freestyle",
            "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit !",
            "subtitle": "Suspendisse bibendum efficitur lectus eget maximus. Proin ultrices sollicitudin nulla eu commodo. Sed lobortis volutpat tempus. Proin quis tincidunt dolor, et euismod mauris. Nunc mollis pulvinar nisi quis pretium.",
            "text": "

\"\"
\n
\nFusce dapibus tellus et ligula euismod, a mattis magna eleifend. Sed pellentesque mollis sapien, eget gravida magna posuere id. Praesent scelerisque massa id egestas faucibus. Quisque aliquam aliquet lacus, nec efficitur sapien vestibulum vel. Sed dictum eget nunc ut convallis. Quisque id volutpat purus. Vivamus porttitor felis magna, in tempus ipsum laoreet a.

", "slug": "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit", "picture": "picture.jpg", "hits": "17187", "hits_today": "3908", "hits_yesterday": "13075", "hits_reset": "2015-07-16", "start_date": "2015-07-15 05:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 11:30:55", "updated_at": "2015-07-16 13:30:04", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247298", "type_id": "32762", "type": "news", "reply_to": null, "approved": "1", "user_id": "28185", "username": "adipiscing", "text": "Donec posuere nisl massa, vitae suscipit nisl mattis in. Phasellus fermentum massa accumsan velit molestie tincidunt. Duis interdum nunc sed nunc varius pulvinar. Donec vel cursus justo. Curabitur condimentum sit amet diam at hendrerit. In convallis congue massa et luctus.", "agree": "0", "disagree": "0", "published": "1", "created_at": "2015-07-16 12:19:27", "updated_at": "0000-00-00 00:00:00", "agreed": 0, "replies": [] }, {...} ], , "tags": [ { "id": "69", "title": "Lorem", "content_id": "32762", "tag_id": "69", "created_at": "2015-07-16 07:42:26" }, { "id": "3834", "title": "ipsum", "content_id": "32762", "tag_id": "3834", "created_at": "2015-07-16 07:42:26" }, { "id": "9015", "title": "adipiscing", "content_id": "32762", "tag_id": "9015", "created_at": "2015-07-16 07:42:26" } ], "media": [ { "id": "67964", "title": "Donec posuere nisl massa", "file": "donec-posuere-nisl-massa.mp4", "type": "video", "own_player": "0", "created_at": "2015-07-15 11:25:16", "updated_at": "0000-00-00 00:00:00", "content_id": "32762", "media_id": "67964" } ] }, {...}, ], "content": [ { "id": "32767", "type": "video", "category": "freestyle", "title": "Pellentesque tempus tristique ligula in fermentum", "subtitle": "Aliquam erat volutpat. Mauris vehicula lobortis velit. Nam et nisl blandit lectus congue tempus. Vestibulum consequat lacus et eleifend efficitur.", "text": "

Morbi ut dui blandit, hendrerit felis at, fermentum odio. Morbi eu gravida eros. Suspendisse finibus nisi at elit bibendum hendrerit. Nullam consectetur et lectus at convallis. Etiam rhoncus nunc mauris, vestibulum ornare magna porttitor non.

", "slug": "pellentesque-tempus-tristique-ligula-in-fermentum", "picture": "picture2.jpg", "hits": "2504", "hits_today": "771", "hits_yesterday": "1660", "hits_reset": "2015-07-16", "start_date": "2015-07-15 09:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 15:03:56", "updated_at": "2015-07-16 13:32:46", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247226", "type_id": "32767", "type": "news", "reply_to": null, "approved": "1", "user_id": "28718", "username": "Integer", "text": "Suspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo.", "agree": "3", "disagree": "0", "published": "1", "created_at": "2015-07-15 16:56:06", "updated_at": "2015-07-16 11:29:21", "agreed": 0, "replies": [] } ], "tags": [ { "id": "202", "title": "Pellentesque", "content_id": "32767", "tag_id": "202", "created_at": "2015-07-15 15:03:56" } ], "media": [] }, {...} }

video/false/false/{page}

To get next video.

Example: GET video/false/false/1

video/{category}

To get all video filtered by category.

Example: GET video/clip
Example for next page: GET video/clip/false/1

video/{category}/{id}

To get one article.

Example: GET video/clip/32807

Object: Podcast

To recover last podcast.

Structure

Podcast calls are structured like this: podcast/{category}/{id}/{page}
First page is always: 0. Then 1, 2, 3, etc.

Example: GET podcast

podcast

To get 20 last podcast.

Example: GET podcast
			
 {
    "type": "podcast",
    "media_url": "http://thedomain.fr/media/podcast/",
    "category": "",
    "total_rows": 6938,
    "per_page": 20,
    "page": 0,
    "hot": [
        {
            "id": "32762",
            "type": "podcast",
            "category": 10,
            "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit !",
            "subtitle": "Suspendisse bibendum efficitur lectus eget maximus. Proin ultrices sollicitudin nulla eu commodo. Sed lobortis volutpat tempus. Proin quis tincidunt dolor, et euismod mauris. Nunc mollis pulvinar nisi quis pretium.",
            "text": "

\"\"
\n
\nFusce dapibus tellus et ligula euismod, a mattis magna eleifend. Sed pellentesque mollis sapien, eget gravida magna posuere id. Praesent scelerisque massa id egestas faucibus. Quisque aliquam aliquet lacus, nec efficitur sapien vestibulum vel. Sed dictum eget nunc ut convallis. Quisque id volutpat purus. Vivamus porttitor felis magna, in tempus ipsum laoreet a.

", "slug": "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit", "picture": "picture.jpg", "hits": "17187", "hits_today": "3908", "hits_yesterday": "13075", "hits_reset": "2015-07-16", "start_date": "2015-07-15 05:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 11:30:55", "updated_at": "2015-07-16 13:30:04", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247298", "type_id": "32762", "type": "news", "reply_to": null, "approved": "1", "user_id": "28185", "username": "adipiscing", "text": "Donec posuere nisl massa, vitae suscipit nisl mattis in. Phasellus fermentum massa accumsan velit molestie tincidunt. Duis interdum nunc sed nunc varius pulvinar. Donec vel cursus justo. Curabitur condimentum sit amet diam at hendrerit. In convallis congue massa et luctus.", "agree": "0", "disagree": "0", "published": "1", "created_at": "2015-07-16 12:19:27", "updated_at": "0000-00-00 00:00:00", "agreed": 0, "replies": [] }, {...} ], , "tags": [ { "id": "69", "title": "Lorem", "content_id": "32762", "tag_id": "69", "created_at": "2015-07-16 07:42:26" }, { "id": "3834", "title": "ipsum", "content_id": "32762", "tag_id": "3834", "created_at": "2015-07-16 07:42:26" }, { "id": "9015", "title": "adipiscing", "content_id": "32762", "tag_id": "9015", "created_at": "2015-07-16 07:42:26" } ], "media": [ { "id": "67964", "title": "Donec posuere nisl massa", "file": "https://thedomain.com/donec-posuere-nisl-massa.mp3", "type": "son", "own_player": "0", "created_at": "2015-07-15 11:25:16", "updated_at": "0000-00-00 00:00:00", "content_id": "32762", "media_id": "67964" } ] }, {...}, ], "content": [ { "id": "32767", "type": "podcast", "category": 12, "title": "Pellentesque tempus tristique ligula in fermentum", "subtitle": "Aliquam erat volutpat. Mauris vehicula lobortis velit. Nam et nisl blandit lectus congue tempus. Vestibulum consequat lacus et eleifend efficitur.", "text": "

Morbi ut dui blandit, hendrerit felis at, fermentum odio. Morbi eu gravida eros. Suspendisse finibus nisi at elit bibendum hendrerit. Nullam consectetur et lectus at convallis. Etiam rhoncus nunc mauris, vestibulum ornare magna porttitor non.

", "slug": "pellentesque-tempus-tristique-ligula-in-fermentum", "picture": "picture2.jpg", "hits": "2504", "hits_today": "771", "hits_yesterday": "1660", "hits_reset": "2015-07-16", "start_date": "2015-07-15 09:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 15:03:56", "updated_at": "2015-07-16 13:32:46", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247226", "type_id": "32767", "type": "news", "reply_to": null, "approved": "1", "user_id": "28718", "username": "Integer", "text": "Suspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo.", "agree": "3", "disagree": "0", "published": "1", "created_at": "2015-07-15 16:56:06", "updated_at": "2015-07-16 11:29:21", "agreed": 0, "replies": [] } ], "tags": [ { "id": "202", "title": "Pellentesque", "content_id": "32767", "tag_id": "202", "created_at": "2015-07-15 15:03:56" } ], "media": [] }, {...} }

podcast/false/false/{page}

To get next podcast.

Example: GET podcast/false/false/1

podcast/{category}

To get all sounds filtered by a podcast category.
List of all podcast categories in podcast_by_category

Example: GET podcast/11
Example for next page: GET podcast/11/false/1

podcast/{category}/{id}

To get one podcast.

Example: GET podcast/11/32812

podcast_by_category

Without parameters, you will have all podcast categories with numbers of podcasts.

Example: GET podcast_by_category
			
 {
    "type": "podcast_category",
    "media_url": "http://mfmradio.fr/media/podcast_category/",
    "category": "podcast",
    "content": [
        {
            "podcast_category_id": "79",
            "title": "Alexandre Devoise et Tiffanie",
            "picture": "mfm-bandeau-6h-grandreveil-2015-2016-800x155.jpg",
            "count": 393
        },
        {
            "podcast_category_id": "68",
            "title": "M comme Montiel",
            "picture": "mfm-bandeau-9h-montiel-2015-2016-800x155.jpg",
            "count": 180
        },
        ...
    ]
 }
			
		 


podcast_by_category/{podcast_category_id}/{page}

To get all podcast from a podcast category.
podcast_category_id is the ID of the podcast category that we can obtain from "podcast_by_category" request

Example: GET podcast_by_category/67/1
			
 {
    "type": "podcast",
    "media_url": "http://thedomain.fr/media/podcast/",
    "category": "",
    "total_rows": 6938,
    "per_page": 20,
    "page": 0,
    "podcast_category": [
        {
            "id": "4",
            "title": "Sed elementum tempus metus",
            "subtitle": "uspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in",
            "picture": "show.jpg",
            "text": "

\n Aenean hendrerit, nisl vitaé cursus commodo, lacus nisi iaculis est, à blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius. Aliquam eget suscipit sapien, vitae ultricies erat. Mauris faucibus semper metus, in commodo odio faucibus sit amet. Donec congue convallis libero eget blandit. Nam sed semper tortor. !

", "lundi": "1", "mardi": "1", "mercredi": "1", "jeudi": "1", "vendredi": "1", "samedi": "0", "dimanche": "0", "published": "1", "start_hour": "06:00:00", "end_hour": "10:00:00", "created_at": "2012-01-10 14:56:01", "updated_at": "2015"​, "media_url": "http://thedomain.fr/media/podcast_category/" }, {...} ], "content": [ { "id": "32767", "type": "podcast", "category": 11, "title": "Pellentesque tempus tristique ligula in fermentum", "subtitle": "Aliquam erat volutpat. Mauris vehicula lobortis velit. Nam et nisl blandit lectus congue tempus. Vestibulum consequat lacus et eleifend efficitur.", "text": "

Morbi ut dui blandit, hendrerit felis at, fermentum odio. Morbi eu gravida eros. Suspendisse finibus nisi at elit bibendum hendrerit. Nullam consectetur et lectus at convallis. Etiam rhoncus nunc mauris, vestibulum ornare magna porttitor non.

", "slug": "pellentesque-tempus-tristique-ligula-in-fermentum", "picture": "picture2.jpg", "hits": "2504", "hits_today": "771", "hits_yesterday": "1660", "hits_reset": "2015-07-16", "start_date": "2015-07-15 09:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 15:03:56", "updated_at": "2015-07-16 13:32:46", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247226", "type_id": "32767", "type": "news", "reply_to": null, "approved": "1", "user_id": "28718", "username": "Integer", "text": "Suspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo.", "agree": "3", "disagree": "0", "published": "1", "created_at": "2015-07-15 16:56:06", "updated_at": "2015-07-16 11:29:21", "agreed": 0, "replies": [] } ], "tags": [ { "id": "202", "title": "Pellentesque", "content_id": "32767", "tag_id": "202", "created_at": "2015-07-15 15:03:56" } ], "media": [] }, {...} }

Object: Hot

To recover hottest articles. Articles that are most readed.

hot/{limit}/{type}

To get last hottest articles.
{limit} is optional (default: 3)
{type} is an optional string. If not set it recover news, son and video else can be: news, son or video
Example: GET hot
			
 {
    "content": [
        {
            "id": "32767",
            "type": "son",
            "category": "podcast",
            "title": "Pellentesque tempus tristique ligula in fermentum",
            "subtitle": "Aliquam erat volutpat. Mauris vehicula lobortis velit. Nam et nisl blandit lectus congue tempus. Vestibulum consequat lacus et eleifend efficitur.",
            "text": "

Morbi ut dui blandit, hendrerit felis at, fermentum odio. Morbi eu gravida eros. Suspendisse finibus nisi at elit bibendum hendrerit. Nullam consectetur et lectus at convallis. Etiam rhoncus nunc mauris, vestibulum ornare magna porttitor non.

", "slug": "pellentesque-tempus-tristique-ligula-in-fermentum", "picture": "picture2.jpg", "hits": "2504", "hits_today": "771", "hits_yesterday": "1660", "hits_reset": "2015-07-16", "start_date": "2015-07-15 09:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 15:03:56", "updated_at": "2015-07-16 13:32:46", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247226", "type_id": "32767", "type": "news", "reply_to": null, "approved": "1", "user_id": "28718", "username": "Integer", "text": "Suspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo.", "agree": "3", "disagree": "0", "published": "1", "created_at": "2015-07-15 16:56:06", "updated_at": "2015-07-16 11:29:21", "agreed": 0, "replies": [] } ], "tags": [ { "id": "202", "title": "Pellentesque", "content_id": "32767", "tag_id": "202", "created_at": "2015-07-15 15:03:56" } ], "media": [] }, {...} }


Object: Event

To recover event's details.
(replace agenda.)

event

To get events list of the current month with 20 results per page

"show_date" is the date to display
"start_hour" is the hour of the event
All details of an event are sended so there's no need to call event detail.

Example: GET event
			

{
    "media_url": "http://thedomain.com/media/event/",
    "total_rows": 90,
    "page": "0",
    "per_page": 20,
    "content": [
        {
            "id": "38908",
            "title": "Integer quis ligula id ipsum ultrices accumsan at sit amet diam",
            "category": "autre",
            "subtitle": "Sed elementum tempus metus, ut semper\n quam faucibus tempus. Suspendisse consequat diam ut augue\nluctus elementum",
            "picture": "aluween.jpg",
            "text": "

Phasellus !

\n\n

Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo. Aenean hendrerit, nisl vitae cursus commodo, lacus nisi iaculis est, a blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius.

\n\n...", "start_hour": "17:00:00", "start_date": "2016-11-02", "repeat": "0", "show_date": "2016-11-02", "diff": "0" }, { "id": "39003", "title": "String ques lagile it lorem ultrices accumsan at set amat diems", "category": "autre", "subtitle": "Sed elementum tempus metus, ut semper\n quam faucibus tempus. Suspendisse consequat diam ut augue\nluctus elementum", "picture": "american-diner.jpg", "text": "

Phasellus !

\n\n

Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo. Aenean hendrerit, nisl vitae cursus commodo, lacus nisi iaculis est, a blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius.

\n\n...", "start_hour": "18:30:00", "start_date": "2016-11-02", "repeat": "0", "show_date": "2016-11-02", "diff": "0" }, {...} ] }


event/{page}

To get next events list with 20 events per page.
First page is always: 0. Then 1, 2, 3, etc.
"show_date" is the date to display
"start_hour" is the hour of the event
All details of an event are sended so there's no need to call event detail.

Example: GET event/2016-12/2
			

{
    "media_url": "http://thedomain.com/media/event/",
    "total_rows_current_month": 90,
    "page": "2",
    "per_page": 20,
    "content": [
        {
            "id": "38908",
            "title": "Integer quis ligula id ipsum ultrices accumsan at sit amet diam",
            "category": "autre",
            "subtitle": "Sed elementum tempus metus, ut semper\n quam faucibus tempus. Suspendisse consequat diam ut augue\nluctus elementum",
            "picture": "aluween.jpg",
            "text": "

Phasellus !

\n\n

Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo. Aenean hendrerit, nisl vitae cursus commodo, lacus nisi iaculis est, a blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius.

\n\n...", "start_hour": "17:00:00", "start_date": "2016-12-02", "repeat": "0", "show_date": "2016-12-02", "diff": "0" }, { "id": "39003", "title": "String ques lagile it lorem ultrices accumsan at set amat diems", "category": "autre", "subtitle": "Sed elementum tempus metus, ut semper\n quam faucibus tempus. Suspendisse consequat diam ut augue\nluctus elementum", "picture": "american-diner.jpg", "text": "

Phasellus !

\n\n

Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in, tempus maximus justo. Aenean hendrerit, nisl vitae cursus commodo, lacus nisi iaculis est, a blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius.

\n\n...", "start_hour": "18:30:00", "start_date": "2016-12-02", "repeat": "0", "show_date": "2016-12-02", "diff": "0" }, {...} ] }

Object: Search

To search something on news, son, video, concours.

search

To post a search.

POST Fields:
- search (required)
- page (optional, default 0). First page is always: 0. Then 1, 2, 3, etc.
- type (optional, default all). Could be not set or "news" or "son" or "video" or "concours"


Example response with error: POST search
			
{
    "error": {
        "code": 1,
        "message": "Un mot clé de minimum 3 caractères est nécéssaire."
    }
}			
		 

Example response with success: POST search
			
{
    "per_page": 20,
    "search": "Lorem",
    "total_rows": 450,
    "content": [
        {
            "id": "32762",
            "type": "son",
            "category": "freestyle",
            "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit !",
            "subtitle": "Suspendisse bibendum efficitur lectus eget maximus. Proin ultrices sollicitudin nulla eu commodo. Sed lobortis volutpat tempus. Proin quis tincidunt dolor, et euismod mauris. Nunc mollis pulvinar nisi quis pretium.",
            "text": "

\"\"
\n
\nFusce dapibus tellus et ligula euismod, a mattis magna eleifend. Sed pellentesque mollis sapien, eget gravida magna posuere id. Praesent scelerisque massa id egestas faucibus. Quisque aliquam aliquet lacus, nec efficitur sapien vestibulum vel. Sed dictum eget nunc ut convallis. Quisque id volutpat purus. Vivamus porttitor felis magna, in tempus ipsum laoreet a.

", "slug": "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit", "picture": "picture.jpg", "hits": "17187", "hits_today": "3908", "hits_yesterday": "13075", "hits_reset": "2015-07-16", "start_date": "2015-07-15 05:08:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-15 11:30:55", "updated_at": "2015-07-16 13:30:04", "start_date_short": "2015-07-15", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [ { "id": "247298", "type_id": "32762", "type": "news", "reply_to": null, "approved": "1", "user_id": "28185", "username": "adipiscing", "text": "Donec posuere nisl massa, vitae suscipit nisl mattis in. Phasellus fermentum massa accumsan velit molestie tincidunt. Duis interdum nunc sed nunc varius pulvinar. Donec vel cursus justo. Curabitur condimentum sit amet diam at hendrerit. In convallis congue massa et luctus.", "agree": "0", "disagree": "0", "published": "1", "created_at": "2015-07-16 12:19:27", "updated_at": "0000-00-00 00:00:00", "agreed": 0, "replies": [] }, {...} ], , "tags": [ { "id": "69", "title": "Lorem", "content_id": "32762", "tag_id": "69", "created_at": "2015-07-16 07:42:26" }, { "id": "3834", "title": "ipsum", "content_id": "32762", "tag_id": "3834", "created_at": "2015-07-16 07:42:26" }, { "id": "9015", "title": "adipiscing", "content_id": "32762", "tag_id": "9015", "created_at": "2015-07-16 07:42:26" } ], "media": [ { "id": "67964", "title": "Donec posuere nisl massa", "file": "donec-posuere-nisl-massa.mp4", "type": "video", "own_player": "0", "created_at": "2015-07-15 11:25:16", "updated_at": "0000-00-00 00:00:00", "content_id": "32762", "media_id": "67964" } ] }, {...} ], "displayed": 15 }



Object: Concours

To recover contests list.

concours

To get last contests.
Example: GET concours
			
 {
    "type": "concours",
    "media_url": "http://thedomain.fr/media/concours/",
    "per_page": 20,
    "page": 0,
    "total_rows": 718,
    "hot": [
        {
            "id": "32811",
            "type": "concours",
            "category": null,
            "title": "Phasellus lobortis arcu et nibh pretium, at dictum erat",
            "subtitle": "Phasellus et magna a ipsum condimentum hendrerit. Donec accumsan ante a dapibus consectetur",
            "text": "

Fusce sit amet mollis mi. Curabitur aliquet aliquam dapibus. Duis vitae tortor massa. Quisque blandit ante non erat auctor, eget sagittis metus fringilla

\n\n

 

", "slug": "phasellus-lobortis-arcu-et-nibh-pretium-at-dictum-erat", "picture": "picture5.jpg", "hits": "102", "hits_today": "10", "hits_yesterday": "47", "hits_reset": "2015-07-22", "start_date": "2015-07-20 11:11:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-20 11:24:40", "updated_at": "2015-07-22 08:26:56", "start_date_short": "2015-07-20", "comments": [], "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "tags": [ { "id": "6977", "title": "lobortis", "content_id": "32811", "tag_id": "6977", "created_at": "2015-07-20 11:58:18" }, { "id": "9447", "title": "pretium", "content_id": "32811", "tag_id": "9447", "created_at": "2015-07-20 11:58:18" }, { "id": "9448", "title": "dictum", "content_id": "32811", "tag_id": "9448", "created_at": "2015-07-20 11:58:18" }, { "id": "10079", "title": "condimentum", "content_id": "32811", "tag_id": "10079", "created_at": "2015-07-20 11:58:18" } ], "media": [] }, {...} ], "content": [ { "id": "32811", "type": "concours", "category": null, "title": "Phasellus lobortis arcu et nibh pretium, at dictum erat", "subtitle": "Phasellus et magna a ipsum condimentum hendrerit. Donec accumsan ante a dapibus consectetur", "text": "

Fusce sit amet mollis mi. Curabitur aliquet aliquam dapibus. Duis vitae tortor massa. Quisque blandit ante non erat auctor, eget sagittis metus fringilla

\n\n

 

", "slug": "phasellus-lobortis-arcu-et-nibh-pretium-at-dictum-erat", "picture": "picture5.jpg", "hits": "102", "hits_today": "10", "hits_yesterday": "47", "hits_reset": "2015-07-22", "start_date": "2015-07-20 11:11:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-20 11:24:40", "updated_at": "2015-07-22 08:26:56", "start_date_short": "2015-07-20", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [], "tags": [ { "id": "6977", "title": "lobortis", "content_id": "32811", "tag_id": "6977", "created_at": "2015-07-20 11:58:18" }, { "id": "9447", "title": "pretium", "content_id": "32811", "tag_id": "9447", "created_at": "2015-07-20 11:58:18" }, { "id": "9448", "title": "dictum", "content_id": "32811", "tag_id": "9448", "created_at": "2015-07-20 11:58:18" }, { "id": "10079", "title": "condimentum", "content_id": "32811", "tag_id": "10079", "created_at": "2015-07-20 11:58:18" } ], "media": [] }, {...} } }

concours/{id}

To get contest details with the ID.

Example: GET concours/32811
			
{
    "type": "concours",
    "media_url": "http://thedomain.fr/media/concours/",
    "content": {
            "id": "32811",
            "type": "concours",
            "category": null,
            "title": "Phasellus lobortis arcu et nibh pretium, at dictum erat",
            "subtitle": "Phasellus et magna a ipsum condimentum hendrerit. Donec accumsan ante a dapibus consectetur",
            "text": "

Fusce sit amet mollis mi. Curabitur aliquet aliquam dapibus. Duis vitae tortor massa. Quisque blandit ante non erat auctor, eget sagittis metus fringilla

\n\n

 

", "slug": "phasellus-lobortis-arcu-et-nibh-pretium-at-dictum-erat", "picture": "picture5.jpg", "hits": "102", "hits_today": "10", "hits_yesterday": "47", "hits_reset": "2015-07-22", "start_date": "2015-07-20 11:11:00", "end_date": null, "allow_comments": "1", "published": "1", "hide_ads": "0", "created_at": "2015-07-20 11:24:40", "updated_at": "2015-07-22 08:26:56", "start_date_short": "2015-07-20", "share_facebook": 10, "share_twitter": 2, "share_googleplus": 3, "comments": [], "tags": [ { "id": "6977", "title": "lobortis", "content_id": "32811", "tag_id": "6977", "created_at": "2015-07-20 11:58:18" }, { "id": "9447", "title": "pretium", "content_id": "32811", "tag_id": "9447", "created_at": "2015-07-20 11:58:18" }, { "id": "9448", "title": "dictum", "content_id": "32811", "tag_id": "9448", "created_at": "2015-07-20 11:58:18" }, { "id": "10079", "title": "condimentum", "content_id": "32811", "tag_id": "10079", "created_at": "2015-07-20 11:58:18" } ], "media": [] }, "canonical_url": "http://thedomain.fr/concours/index/32811/phasellus-lobortis-arcu-et-nibh-pretium-at-dictum-erat" }

concours/false/{page}

To get next contests.

Example: GET concours/false/1

concours_post/{id}

To post participation to a contest with the contest ID.

POST Fields:
- mail (string) (required)
- lastname (string) (required)
- name (string) (required)
- years (numeric) (required)
- months (numeric) (required)
- days (numeric) (required)
- phone (numeric) (required)
- address (string) (required)
- zipcode (numeric) (required)
- city (string) (required)
- user_id (numeric) (optional : if user is logged in, fill it)

Example: POST concours_post/32831
Example response with error:
			
{
    "error": {
        "code": 301,
        "title":"Already",
        "message":"Vous avez déjà participé à ce concours."
    }
}			
		 

Example response with success:
			
{
    "content": "Votre participation a bien été prise en compte."
}			
		 


Object: Poll

To display polls.

poll_show

To display last poll.
Example: GET poll_show
			
{
    "content": {
        "id": "104",
        "question": "Phasellus lobortis arcu et nibh pretium, at dictum erat ?",
        "answers": [
            {
                "id": "3328",
                "poll_id": "104",
                "text": "Oui",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null
            },
            {
                "id": "3329",
                "poll_id": "104",
                "text": "Non",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null
            },
            {
                "id": "3330",
                "poll_id": "104",
                "text": "NSP",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null
            }
        ],
        "start_date": "2016-07-07 09:00:00",
        "published": "1",
        "created_at": "2016-07-07 06:41:45",
        "updated_at": null
    }
}
			
		 

poll_result/{id}

To display last results poll.
Example: GET poll_result/104
			
{
    "content": {
        "id": "104",
        "question": "Phasellus lobortis arcu et nibh pretium, at dictum erat ?",
        "answers": [
            {
                "id": "3328",
                "poll_id": "104",
                "text": "Oui",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null,
                "votes": 15,
                "percent": 41
            },
            {
                "id": "3329",
                "poll_id": "104",
                "text": "Non",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null,
                "votes": 18,
                "percent": 49
            },
            {
                "id": "3330",
                "poll_id": "104",
                "text": "NSP",
                "created_at": "2016-07-07 06:41:45",
                "updated_at": null,
                "votes": 4,
                "percent": 11
            }
        ],
        "published": "1",
        "created_at": "2016-07-07 06:41:45",
        "updated_at": null
    }
}			
		 

poll_post

To post an answer on a poll.

POST Fields:
- poll_id
- answer

Example: POST poll_post
Example response with error:
			
{
    "error": {
        "code": 1,
        "message": "Poll not found"
    }
}			
		 

Example response with success:
			
{
    "podcast_url": "http://thedomain.com/medias/podcasts/",
    "image_url": "http://thedomain.com/medias/images/",
    "diaporama_url": "http://thedomain.com/medias/diaporamas/",
    "content": "ok"
}			
		 


Object: Alert

To display news alert if needed.

alert_info

To get one random alert info that is scheduled.
Some information may be reported as an alert. This alert may appear at any time and on any page. After 6 seconds this alert info disappear and will be displayed on the next page seen for 6 seconds, etc. If the user clic on the cross, this alert wont be displayed until the end of navigation.
If the link is in the same domain that articles of the application (check with regex like #thedomain\.com\/(news|son|video)\/([0-9]+)/# ), they would be open in application, otherwise in a webview.
Example: GET alert_info
			
{
	"podcast_url": "https:\/\/thedomain.com\/medias\/podcasts\/",
	"image_url": "https:\/\/thedomain.com\/medias\/images\/",
	"diaporama_url": "https:\/\/thedomain.com\/medias\/diaporamas\/",
	"content": {
		"id": "1",
		"title": "Ceci est un titre d'une nouvelle alerte info",
		"link": "https:\/\/thedomain.com\/article\/80780\/la-region-auvergne-rhone-alpes-a-enfin-trouve-son-nom",
		"start_date": "2016-05-27 00:00:00",
		"end_date": "2016-08-31 23:50:17",
		"published": "1",
		"created_at": "2016-05-27 00:00:00",
		"updated_at": null
	}
}
			
		 


Object: Contact

To get contact details.

contact

To get contacts details.

Example: GET contact
			
{
    "title": "The title of the page",
    "subtitle": "Some introduction to display on the page",
    "footer": "Some text to display to footer",
    "contacts": {
        "Alertez Radio": "[email protected]",
        "Contactez la rédaction": "[email protected]",
        "Contactez la radio": "[email protected]",
        "Contactez la régie": "[email protected]"
    },
    "phone": "04 72 10 15 30"
}
			
		 


Object: Radio

To recover radio params.


webradio

To get all radios.

Example: GET webradio
			
{
    "media_url": "http://thedomain.fr/media/radio/",
    "content": [
        {
            "id": "1",
            "title": "Lorem ipsum",
            "subtitle": null,
            "category": "nationale",
            "file": "webradio.png",
            "background": "B4B4B4",
            "border": "B4B4B4",
            "slug": "lorem-ipsum",
            "flux_aac": "http://lorem-ipsum.ice.infomaniak.ch/lorem-ipsum-high.aac",
            "flux_mp3": "http://lorem-ipsum.ice.infomaniak.ch/lorem-ipsum-high.mp3",
            "url_player": null,
            "url_win8": "radio://www.todae.fr/windows8/?rid=lorem-ipsum&referrer=http://thedomain.fr",
            "playlist": "http://thedomain.fr/winradio/prog0.json",
            "playlist_id": "0",
            "pubs": "{\"300x250\":{\"server\":\"espacegroup.adswizz.com\",\"prerollZone\":20,\"midrollZone\":20,\"fallbackZone\":17},\"728x90\":{\"server\":\"espacegroup.adswizz.com\",\"prerollZone\":19,\"midrollZone\":19,\"fallbackZone\":18}}",
            "highlight": "0",
            "published": "1",
            "created_at": "0000-00-00 00:00:00",
            "updated_at": "2014-06-17 23:05:19",
            "zone_title": "",
            "zones": [
            {
              "id": "13",
              "title": "Zone1",
              "subtitle": "

.

", "category": null, "file": null, "picture": "", "thumb_smartphone": null, "background": null, "border": null, "slug": "lorem-ipsum1", "flux_aac": "http://lorem-ipsum1.ice.infomaniak.ch/lorem-ipsum1-high.aac", "flux_mp3": "http://lorem-ipsum1.ice.infomaniak.ch/lorem-ipsum1-high.mp3", "url_player": null, "url_win8": null, "playlist": null, "pubs": null, "highlight": "1", "zone_id": "1", "in_api": "1", "published": "1", "created_at": "2022-03-23 14:59:43", "updated_at": "2022-03-23 15:14:27" }, {...} }, {...} ] }

In the "playlist" field there is a link to a public json file with the current song and the last 9 songs played. This file can be called directly without authentication.
Example: GET winradio/prog2.json
			
[
    {
        "start_date": "2015-10-02 14:41:15",
        "artist": "Kid Ink",
        "title": "Show Me",
        "cover": "http://covers.eg-ad.fr/show-me-remix.png"
    },
    {
        "start_date": "2015-10-02 14:36:48",
        "artist": "Macklemore & Ryan Lewis",
        "title": "Downtown",
        "cover": "http://covers.eg-ad.fr/macklemore-feat-ryan-lewis-downtown.jpg"
    },
    {...}
]
			
		 

webradio/{id}

To get one radio.

Example: GET webradio/1
			
{
    "media_url": "http://thedomain.fr/media/radio/",
    "content": {
            "id": "1",
            "title": "Lorem ipsum",
            "subtitle": null,
            "category": "nationale",
            "file": "webradio.png",
            "background": "B4B4B4",
            "border": "B4B4B4",
            "slug": "lorem-ipsum",
            "flux_aac": "http://lorem-ipsum.ice.infomaniak.ch/lorem-ipsum-high.aac",
            "flux_mp3": "http://lorem-ipsum.ice.infomaniak.ch/lorem-ipsum-high.mp3",
            "url_player": null,
            "url_win8": "radio://www.todae.fr/windows8/?rid=lorem-ipsum&referrer=http://thedomain.fr",
            "playlist": "http://thedomain.fr/winradio/prog0.json",
            "playlist_id": "0",
            "pubs": "{\"300x250\":{\"server\":\"espacegroup.adswizz.com\",\"prerollZone\":20,\"midrollZone\":20,\"fallbackZone\":17},\"728x90\":{\"server\":\"espacegroup.adswizz.com\",\"prerollZone\":19,\"midrollZone\":19,\"fallbackZone\":18}}",
            "highlight": "0",
            "published": "1",
            "created_at": "0000-00-00 00:00:00",
            "updated_at": "2014-06-17 23:05:19",
            "zone_title": "Zone 1",
            "zones": [
            {
              "id": "13",
              "title": "Zone1",
              "subtitle": "

.

", "category": null, "file": null, "picture": "", "thumb_smartphone": null, "background": null, "border": null, "slug": "lorem-ipsum1", "flux_aac": "http://lorem-ipsum1.ice.infomaniak.ch/lorem-ipsum1-high.aac", "flux_mp3": "http://lorem-ipsum1.ice.infomaniak.ch/lorem-ipsum1-high.mp3", "url_player": null, "url_win8": null, "playlist": null, "pubs": null, "highlight": "1", "zone_id": "1", "in_api": "1", "published": "1", "created_at": "2022-03-23 14:59:43", "updated_at": "2022-03-23 15:14:27" }, {...} } }


zone

To get all zones if there are zones.

Example: GET zone
			
{
  "media_url": "https:/thedomain.fr/media/radio/",
  "content": {
    "HAUTE SAVOIE": {
      "13": "ANNECY",
      "14": "SAINT JORIOZ / TALLOIRES / FAVERGES",
      "18": "CLUSES / VALLEE DE L’ARVE / LA ROCHE SUR FORON"
    },
    "SAVOIE": {
      "15": "AIX LES  BAINS",
      "16": "CHAMBERY",
      "17": "UGINE"
    },
    "AIN": {
      "19": "BELLEGARDE",
      "20": "BELLEY",
      "21": "OYONNAX"
    }
  }
}
			
		 


vote/{title_id}/{up|down}

To vote for one on air title.

{title_id} : recovered from on air playlist prog (like: http://thedomain.fr/winradio/prog0.json).
{up|down} : can be 'up' or 'down' following user vote.

Example: GET vote/05ba6bb489e6433d386db7811f0827f3/up
			
{
    "content": "ok"
}
			
		 

frequences (deprecated)

Deprecated: See Object: Frequency instead
To get all frequencies

Example: GET frequences
			
 {
    "content": [
        {
            "id": "35",
            "ville": "Paris",
            "frequence": "88.2",
            "departement_nom": "Paris",
            "departement_id": "75",
            "region_nom": "Ile de france",
            "gps": "48.85661;2.35222",
            "updated_at": "0000-00-00 00:00:00",
            "created_at": "0000-00-00 00:00:00"
        },
        {...}
 }
			
		 

show

To get all shows.

Example: GET show
			
{
    "type": "show",
    "media_url": "http://thedomain.fr/media/show/",
    "content": [
        {
            "id": "4",
            "title": "Sed elementum tempus metus",
            "subtitle": "uspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in",
            "picture": "show.jpg",
            "text": "

\n Aenean hendrerit, nisl vitaé cursus commodo, lacus nisi iaculis est, à blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius. Aliquam eget suscipit sapien, vitae ultricies erat. Mauris faucibus semper metus, in commodo odio faucibus sit amet. Donec congue convallis libero eget blandit. Nam sed semper tortor. !

", "lundi": "1", "mardi": "1", "mercredi": "1", "jeudi": "1", "vendredi": "1", "samedi": "0", "dimanche": "0", "published": "1", "start_hour": "06:00:00", "end_hour": "10:00:00", "created_at": "2012-01-10 14:56:01", "updated_at": "2015" }, {...} ] }

show/{id}

To get one show.

Example: GET show/4
			
{
    "type": "show",
    "media_url": "http://thedomain.fr/media/show/",
    "content": {
            "id": "4",
            "title": "Sed elementum tempus metus",
            "subtitle": "uspendisse consequat diam ut augue luctus elementum. Suspendisse hendrerit vehicula leo et aliquam. Mauris risus tellus, varius quis massa in",
            "picture": "show.jpg",
            "text": "

\n Aenean hendrerit, nisl vitaé cursus commodo, lacus nisi iaculis est, à blandit sem metus sed sapien. Cras euismod velit vel lectus porta, at pretium ligula varius. Aliquam eget suscipit sapien, vitae ultricies erat. Mauris faucibus semper metus, in commodo odio faucibus sit amet. Donec congue convallis libero eget blandit. Nam sed semper tortor. !

", "lundi": "1", "mardi": "1", "mercredi": "1", "jeudi": "1", "vendredi": "1", "samedi": "0", "dimanche": "0", "published": "1", "start_hour": "06:00:00", "end_hour": "10:00:00", "created_at": "2012-01-10 14:56:01", "updated_at": "2015" } }


top_playlist/{limit}

To get only artist/title tops.
Ordered by "num"
Limit is optional (default: 5)

Example: GET top_playlist
			
{
    "type": "playlist",
    "content": [
        {
            "id": "2",
            "artist": "Deorro",
            "title": "Bailar",
            "picture": "http://covers.eg-ad.fr/deorro-i-can-be-somebody.jpg",
            "nb": "50",
            "num": 1
        },
        {
            "id": "1",
            "artist": "Julian Perretta",
            "title": "I Cry",
            "picture": "http://covers.eg-ad.fr/julian-perretta-i-cry-radio-edit.jpg",
            "nb": "45",
            "num": 2
        },
        {...}
}
			
		 

content_playlist/{limit} (deprecated)

Deprecated: See top_playlist instead
To get Tops of content. Limit is optional (default: 40)

Example: GET content_playlist
			
{
    "content": [
        {
            "id": "30366",
            "type": "video",
            "category": "clip",
            "title": "In rutrum - nisi (Official Video)",
            "subtitle": "Curabitur eget ligula eu lorem viverra volutpat sed in ligula. Nunc leo enim, tincidunt a rhoncus a, hendrerit ut nulla.",
            "picture": "clip1.jpg",
            "start_date": "2015-07-06",
            "num": 1
        },
        {
            "id": "31924",
            "type": "video",
            "category": "clip",
            "title": "Phasellus - fermentum (Clip Officiel)",
            "subtitle": "Curabitur condimentum sit amet diam at hendrerit. In convallis congue massa et luctus. Morbi mauris ipsum, pellentesque sed odio et, sodales pretium nulla.",
            "picture": "clip2.jpg",
            "start_date": "2015-07-06",
            "num": 2
        },
        {...}
    ]
}
			
		 


playlist/{limit} (deprecated)

Deprecated: See top_playlist instead
To get only artist/title tops.
Ordered by "num"
Limit is optional (default: 40)

Example: GET playlist
			
{
    "type": "playlist",
    "content": [
        {
            "id": "2",
            "artist": "Deorro",
            "title": "Bailar",
            "picture": "http://covers.eg-ad.fr/deorro-i-can-be-somebody.jpg",
            "text": null,
            "created_at": "2016-09-16 16:00:13",
            "updated_at": null,
            "num": 1
        },
        {
            "id": "1",
            "artist": "Julian Perretta",
            "title": "I Cry",
            "picture": "http://covers.eg-ad.fr/julian-perretta-i-cry-radio-edit.jpg",
            "text": null,
            "created_at": "2016-09-16 16:00:13",
            "updated_at": null,
            "num": 2
        },
        {...}
}
			
		 

history/{webradio_id}/{date}/{hour}/{user_id}

To get playlist of an hour a day.
webradio_id (required, available in "webradio")
date (required, english format like YYYY-MM-DD)
hour (required, 24h format)
user_id (optional, if not empty, user will have access to 31 last days, instead of only current day)

Example: GET history/1/2015-12-10/10
			
{
    "nb_days": 0,
    "post_date": "2015-12-10",
    "post_hour": "10",
    "post_radio": 1,
    "content": [
        {
            "artist": "The Weeknd",
            "title": "The Hills",
            "start_date": "2015-12-10 10:01:59",
            "picture": "http://covers.eg-ad.fr/weeknd-the-hills.jpg"
        },
        {
            "artist": "Outkast",
            "title": "Ms Jackson",
            "start_date": "2015-12-10 10:04:48",
            "picture": "http://covers.eg-ad.fr/stankonia.jpg"
        },
        {...}
    ]
}
			
		 

Object: Frequency

To get all frequencies. (replace old frequences system)

frequency

To get all frequencies.

Example: GET frequency
			
 {
    "content": [
        {
          "id": "1",
          "city": "AIX-EN-PROVENCE",
          "frequency": "92,0",
          "department_id": "13",
          "gps": "43.5249088;5.4541444",
          "published": "1",
          "department_code": "13",
          "department_name": "Bouches-du-Rhône",
          "department_name_uppercase": "BOUCHES-DU-RHÔNE",
          "department_slug": "bouches-du-rhone",
          "department_name_soundex" "B2365",
          "region_id": "13",
          "region_code": "FR-PAC",
          "region_name": "Provence-Alpes-Côte d'Azur",
          "region_slug": "provence-alpes-cote-d-Azur",
          "updated_at": "2019-01-23 14:12:30",
          "created_at": "0000-00-00 00:00:00",
        },
        {...}
 }
			
		 

Object: Newsletter

To register at newsletter.

newsletter

To register at newsletter.

POST Fields:
- name
- email

Example: POST newsletter
Example response with error:
			
{
    "error": {
        "code": 301,
        "title":"Already",
        "message":"Votre email est déjà inscrit à la newsletter."
    }
}			
		 

Example response with success:
			
{
    "content": "Votre inscription a bien été prise en compte."
}			
		 

Object: Horoscope

To get horoscope.

horoscope

To get last horoscope.

Example: GET horoscope
			
{
    "type": "horoscope",
    "content": [
        {
            "belier": "Quelques changements imprévus pourraient survenir dans votre travail aujourd’hui.",
            "taureau": "Votre vie familiale sera mise en valeur. L'ambiance sera chaleureuse.",
            "gemeaux": "Les couples se comprendront mieux et retrouveront une bonne complicité.",
            "cancer": "Il est possible que vous soyez fatigué mais votre équilibre reviendra si vous adoptez une bonne hygiène de vie.",
            "lion": "En affaires, vos efforts aboutiront à des résultats favorables.",
            "vierge": "Vous aurez une quantité importante de travail, mais vous saurez vous démarquer.",
            "balance": "Faites jouer vos relations pour obtenir une juste récompense de vos mérites.",
            "scorpion": "Côté cœur, ne vous fiez pas à toutes les rencontres que vous ferez en cette journée.",
            "sagittaire": "Les planètes auront un effet très positif sur le plan nerveux.",
            "capricorne": "Vous saurez gérer avec efficacité vos placements, mais ne vous lancez pas dans des opérations trop risquées.",
            "verseau": "Vous ferez de belles rencontres et pourrez louer de nombreux liens !",
            "poisson": "Dans votre travail, vous aurez beaucoup à faire, mais vous saurez vous organiserez."
        }
    ],
    "media_url": "http://thedomain.fr/media/horoscope/"
}
  		
		 

Object: Weather

To get weather.

weather

To get weather for today and next two days.

Example: GET weather
			
{
    "type": "weather",
    "today": "01 Mars",
    "tomorrow": "02 Mars",
    "after_tomorrow": "03 Mars",
    "content": [
        {
            "id": "149",
            "date": "01 Mars",
            "tempe_morning": "3.8",
            "namepictos_morning": "Pluies faibles",
            "pictos_morning": "pluiefaible.png",
            "tempe_noon": "11.1",
            "namepictos_noon": "Couvert",
            "pictos_noon": "couvert.png",
            "tempe_afternoon": "10.9",
            "namepictos_afternoon": "Couvert",
            "pictos_afternoon": "couvert.png",
            "tempe_evening": "8.2",
            "namepictos_evening": "Couvert",
            "pictos_evening": "couvert.png",
            "created_at": "2012-02-28 03:00:00",
            "updated_at": "2017-02-28 03:02:01"
        },
        {
            "id": "150",
            "date": "02 Mars",
            "tempe_morning": "7.5",
            "namepictos_morning": "Pluies faibles",
            "pictos_morning": "pluiefaible.png",
            "tempe_noon": "10.9",
            "namepictos_noon": "Pluies faibles",
            "pictos_noon": "pluiefaible.png",
            "tempe_afternoon": "12.2",
            "namepictos_afternoon": "Couvert",
            "pictos_afternoon": "couvert.png",
            "tempe_evening": "8.3",
            "namepictos_evening": "Nuageux",
            "pictos_evening": "nuageux.png",
            "created_at": "2012-02-29 03:00:01",
            "updated_at": "2017-02-28 03:02:01"
        },
        {
            "id": "151",
            "date": "03 Mars",
            "tempe_morning": "9.9",
            "namepictos_morning": "Voilé",
            "pictos_morning": "voile.png",
            "tempe_noon": "14.8",
            "namepictos_noon": "Voilé",
            "pictos_noon": "voile.png",
            "tempe_afternoon": "14.4",
            "namepictos_afternoon": "Voilé",
            "pictos_afternoon": "voile.png",
            "tempe_evening": "11.9",
            "namepictos_evening": "Voilé",
            "pictos_evening": "voile.png",
            "created_at": "2012-03-01 03:00:01",
            "updated_at": "2017-02-28 03:02:01"
        }
    ],
    "media_url": "http://thedomain.fr/media/weather/"
}
  		
		 


Object: Traffic

To get traffic informations.

traffic

To get all traffic informations.
List of categories:
0 : mobile radars
1 : fixed radars
2 : red lights radars / radars feu rouge
3 : roadworks / travaux
4 : accidents


Example: GET traffic
			
{
    "type": "traffic",
    "content": {
        "0": [],
        "1": [
            {
                "id": "140283",
                "type": "traffic",
                "category": "1",
                "title": "Périphérique Nord TEO-OPENLY - Lyon  Sens Villeurbanne vers Ecully  Entre les tunnels de Caluire et de Rochecardon. Au niveau de la sortie 3. Limité à 90km/h",
                "subtitle": "",
                "text": null,
                "slug": null,
                "picture": null,
                "hits": null,
                "hits_today": null,
                "hits_yesterday": null,
                "hits_reset": null,
                "start_date": "2015-11-20 14:11:00",
                "end_date": null,
                "allow_comments": "1",
                "published": "1",
                "hide_ads": "0",
                "in_timeline": "0",
                "created_at": "2015-11-20 14:18:01",
                "updated_at": "2015-11-20 14:18:01",
                "media_url": "http://www.radioespace.com/media/traffic/"
            },
            {...},
          ],
         "2": [
            {
                "id": "140283",
                "type": "traffic",
                "category": "2",
                "title": "Lorem ipsum est da ferlo derni pourma",
                "subtitle": "",
                "text": null,
                "slug": null,
                "picture": null,
                "hits": null,
                "hits_today": null,
                "hits_yesterday": null,
                "hits_reset": null,
                "start_date": "2015-11-20 14:11:00",
                "end_date": null,
                "allow_comments": "1",
                "published": "1",
                "hide_ads": "0",
                "in_timeline": "0",
                "created_at": "2015-11-20 14:18:01",
                "updated_at": "2015-11-20 14:18:01",
                "media_url": "http://www.radioespace.com/media/traffic/"
            },
            {...},
          ],
          "3": [],
          "4": []
      }
}
   		
		 

traffic/{category_id}

To get all traffic informations.
List of categories:
0 : mobile radars
1 : fixed radars
2 : red lights radars / radars feu rouge
3 : roadworks / travaux
4 : accidents


Example: GET traffic/1
			
{
    "type": "traffic",
    "content": [
        {
            "id": "140283",
            "type": "traffic",
            "category": "1",
            "category_id": "1",
            "title": "Périphérique Nord TEO-OPENLY - Lyon  Sens Villeurbanne vers Ecully  Entre les tunnels de Caluire et de Rochecardon. Au niveau de la sortie 3. Limité à 90km/h",
            "subtitle": "",
            "text": null,
            "slug": null,
            "picture": null,
            "hits": null,
            "hits_today": null,
            "hits_yesterday": null,
            "hits_reset": null,
            "start_date": "2015-11-20 14:11:00",
            "end_date": null,
            "allow_comments": "1",
            "published": "1",
            "hide_ads": "0",
            "in_timeline": "0",
            "created_at": "2015-11-20 14:18:01",
            "updated_at": "2015-11-20 14:18:01",
            "media_url": "http://www.radioespace.com/media/traffic/"
        },
        {...},
     ],
}
   		
		 

Object: Comment

To post comments.

comment_post/{id}

To post a comment on a content with the content ID.

POST Fields:
- type (string) (required: must be the content type: news or video or son)
- username (string) (required)
- text (string) (required)
- user_id (numeric) (optional : if user is logged in, fill it, and auto fill username which then would be read only.)

Example: POST comment_post/32831
Example response with error:
			
{
    "error": {
        "code": 301,
        "title":"Already",
        "message":"Ce commentaire existe déjà."
    }
}			
		 

Example response with success:
			
{
    "content": "Votre commentaire a bien été pris en compte."
}			
		 

Object: User

To register/login.

register

To create an account.

POST Fields:
- username
- email
- password


Example: POST register
Example response with error:
			
{
    "error": {
        "code": 1,
        "message": "Ce nom d'utilisateur est réservé ou incorrect. Connectez-vous s'il s'agit du votre."
    }
}			
		 

Example response with success:
			
{
     "content": {
        "user_id": "171550"
    }
}			
		 

unregister

To remove an account.

POST Fields:
- email
- password


Example: POST unregister/{user_id}
Example response with error:
			
{
    "error": {
        "code": 301,
        "message": "Ce compte n'existe pas ou a déjà été supprimé."
    }
}			
		 

Example response with success:
			
{
     "content": {
        "message": "Votre compte a bien été supprimé"
    }
}			
		 

login

To log in.

POST Fields:
- login
- password


Example: POST login
Example response with error:
			
{
    "error": {
        "code": 1,
        "message": "Tous les champs sont requis"
    }
}			
		 

Example response with success:
			
{
    "content": {
        "user_id": "171550"
    }
}			
		 

forgot_password

If a user has forgot its password.

POST Fields:
- login (required, must contain email or login)


Example: POST forgot_password
Example response with error:
			
{
    "error": {
        "code": 301,
        "title": "Errors",
        "message": "Le champs login est requis."
    }
}			
		 

Example response with success:
			
{
     "content": "Un email vous a été renvoyé avec les instructions pour réinitialiser votre mot de passe."
}			
		 

post_content

If a user want to post an alert or send a contribution

POST Fields:
- email (required)
- name (required)
- text (required)
- file (optionnal) (file types allowed: jpg|gif|png|mp3|m4a|mov|avi|mp4|mpg)


Example: POST post_content
Example response with error:
			
{
    "error": {
        "code": 1,
        "message": "Erreur lors de l\'envoi du fichier."
    }
}			
		 

Example response with success:
			
{
     "content": "Votre alerte a bien été prise en compte."
}			
		 


Object: Params

To get params.

params

To get all params.

Example: GET params
Example response:
			
{
   "appname": "Radio Name",
   "disable_autoplay": 0,
   "rating_url": {
        "ios": "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=xxxxxxxx",
        "android": "https://play.google.com/store/apps/details?id=fr.egdigital.thedomain",
        "win": ""
    },
    "notif": {
        "ios": {
          "id": 3,
          "version": "2.2",
          "title": "The Title",
          "text": "The text of the popup !",
          "buttons": [
              {
                  "button_title": "Annuler",
                  "button_url": ""
              },
              {
                  "button_title": "Mettre à jour",
                  "button_url": "http://itunes.apple.com/fr/app/thedomain/idxxxxxxxx?mt=8"
              }
          ],
        },
        "android": {
          "id": 3,
          "version": "2.2",
          "title": "The Title",
          "text": "The text of the popup !",
          "buttons": [
              {
                  "button_title": "Annuler",
                  "button_url": ""
              },
              {
                  "button_title": "Mettre à jour",
                  "button_url": "https://play.google.com/store/apps/details?id=fr.egdigital.thedomain"
              }
          ],
        },
        "win": {
          "id": 3,
          "version": "2.2",
          "title": "The Title",
          "text": "The text of the popup !",
          "buttons": [
              {
                  "button_title": "Annuler",
                  "button_url": ""
              },
              {
                  "button_title": "Mettre à jour",
                  "button_url": ""
              }
          ],
        },
    },
    "links": {
        "website": "https://thedomain.fr/",
        "facebook": "https://www.facebook.com/thedomain",
        "twitter": "https://www.twitter.com/thedomain",
        "googleplus": "https://plus.google.com/+thedomain"
    },
    "ads": {
        "ios": {
            "publisher_id": "3730608",
            "interstitial": "thedomain_320x480_ios",
            "banner": "thedomain_320x50_ios"
        },
        "android": {
            "publisher_id": "3730608",
            "interstitial": "thedomain_320x480_android",
            "banner": "thedomain_320x50_android"
        },
        "win": {
            "publisher_id": "3730608",
            "interstitial": "thedomain_320x480_android",
            "banner": "thedomain_320x50_android"
        }
    },
    "analytics": {
        "ios": "UA-26087717-xx",
        "android": "UA-26087717-xx",
        "win": "UA-26087717-xx"
    }
}			
		 

Object: Lang

To get lang translations.

lang/{CODE}

Default: {CODE} = fr
To get all lang translation of the country code.

Example: GET lang/fr
Example response:
			
{
	"lang": {
		"code": "fr",
		"listen_title": "J'écoute un titre sympa en ce moment sur l'application NOM DE LA RADIO !",
		"app_available": "L'application NOM DE LA RADIO est disponible gratuitement pour Android, IOS, et Windows Phone",
		"listen_podcast": "J'écoute un podcast sympa en ce moment sur l'application NOM DE LA RADIO !",
		"article_good": "Article sympa sur l'application NOM DE LA RADIO !",
		"also_available_on_website": "(Disponible aussi sur le site http:\/\/www.virageradio.com\/)",
		"perfect_radio": "J'ai découvert une radio EXCEPTIONNELLE !!!",
		"email_required": "NOM DE LA RADIO - Merci de bien indiquer votre email",
		"email_wrong": "NOM DE LA RADIO - Votre email semble être non valide",
		"message_required": "NOM DE LA RADIO - Merci de bien indiquer votre message",
		"file_wrong": "Attention ! ce document ne pourra nous parvenir car il semble non valide.",
		"rating_app": "NOM DE LA RADIO - Si vous aimez cette application, laissez-nous un petit commentaire et une bonne note sur le store. Merci de votre support !",
		"rating_button_ok": "Noter",
		"rating_button_never": "Jamais",
		"rating_button_later": "Plus tard",
		"quit_app": "NOM DE LA RADIO - Voulez-vous vraiment quitter cette application ?",
		"yes": "Oui",
		"no": "Non",
		"ok": "Ok",
		"cancel": "Annuler",
		"search_minimum": "Au moins 3 lettres pour votre recherche svp !",
		"delete_title": "NOM DE LA RADIO - SUPPRIMER CE TITRE DE VOTRE PLAYLIST ?",
		"share_playlist": "Ma Playlist sur l'application NOM DE LA RADIO",
		"delete_radio": "NOM DE LA RADIO - SUPPRIMER CETTE RADIO DE VOS FAVORIS ?",
		"send_sms": "NOM DE LA RADIO - Votre texte"
	}
}			
		 

Caching


Store API responses in your application or on your site if you expect a lot of use. For example, don’t try to call the API on every page load of your website landing page. Instead, call the API infrequently and load the response into a local cache. When users hit your website load the cached version of the results.


API Rate Limit



Copyright

Copyright © 2015 EG Digital