Click here for a complete list of routes.
/news
GET /news restricted
This request returns the news targeted at a given member.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/news HTTP/1.1
Host: api.lionsclubs.ch
X-Authorization: access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 2,
"news": [
{
"date": "2016-09-17 09:07:00",
"title": "Title of the news item",
"author": "John Doo",
"abstract": "Some text as teaser for the news item",
"media": "https://www.example.com/path/to/some/image.jpg",
"url": "https://www.example.com/path/to/detail/of/the/news.html"
},
{
"...": "..."
}
]
}
GET /news/sources restricted
This request returns the list of news sources.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/news/sources HTTP/1.1
Host: api.lionsclubs.ch
X-Authorization: access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 3,
"sources": [
{
"id": "25",
"name": "LC Broye-Vully"
},
{
"id": "12",
"name": "LC Fribourg-Sarine"
},
{
"...": "..."
}
]
}
GET /news/subscription restricted
This request returns the list of news sources for the given user. "auto" defines wether the list was automatically generated for the user.
The following is a sample HTTP GET request and response. The placeholders
shown need to be replaced with actual values.
Request example
GET /v2/news/subscription HTTP/1.1
Host: api.lionsclubs.ch
X-Authorization: access-token
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{
"success": true,
"count": 2,
"auto": false,
"sources": [
{
"id": "25",
"name": "LC Broye-Vully"
},
{
"id": "12",
"name": "LC Fribourg-Sarine"
}
]
}
POST /news/subscription restricted
This request sets the list of news sources for the given user. The list is a comma-separated list of source IDs.
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
Request example
POST /v2/news/subscription HTTP/1.1 Host: api.lionsclubs.ch X-Authorization:access-token
Content-Type: application/json Content-Length:length
{ "sources": "string" }
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"success":true}