Beruflich Dokumente
Kultur Dokumente
1. Overview
1. 1. Overview
2. Plugins Documentation
2. 1. Plugins Overview
2. 1. 1. Custom sections overview
GoodBarber allows you to create your own sections, using HTML5.
There are 2 types of custom sections, with 2 levels of complexity:
3. Some advices
When you think about integrate a customized section into your app, think about the features and the level of
customization that you will need.
The HTML5 plugins will allow you to enrich you app, but will be more complex to develop than a basic Custom section. It
will also need to be maintained along the life of your app.
Always keep it simple!
All the dependancies to the plugin files have to be made in the current directory (./).
gbPostData
Contains a dictionary of the parameters in POST following the call of the preceding method, in the case of navigation
methods.
{
...
}
2. 2. 2. Basic methods
In your GoodBarber HTML5 plugin, you can use "basic" methods, allowing interactions with the user's device.
These methods are also available in the Basic Custom sections.
Most of the basic methods can be called by launching a navigation to a standard URL scheme. They're also available, in
an easier way, in the GoodBarber JavaScript ToolKit.
3. Call (tel:)
If you want to start a phone call within your plugin, you can use the URL prefix tel:.
Warning: There are no alert before the phone call starts using the tel: method. If you want to ask your user for a
confirmation, you'll need to implement a confirmation alert.
Example of phone call within a plugin:
<a href="tel:+1(555)555-5555">Call +1 (555) 555-5555</a>
5. Maps Link
The maps method allows to open directly the Maps native app on the user's device, with one or several parameters.
The parameters to include into the URL are the one which usually follow URLs like "http://maps.google.com" and
"http://maps.apple.com". You can find more information about these parameters in the Apple reference documentation.
The maps method allows you to send seamlessly the user to the dedicated native app of his device (Maps on iOS,
Google Maps on Android). If you want to send your users to a specific app (without the automatic choice), you can
directly make a link to the destination URL that will be opened into the in-app browser.
Example of the maps method usage:
<a href="goodbarber://maps?q=cupertino">Locate "Cupertino"</a>
the
2. 2. 3. Navigation methods
Your plugin has to delegate its navigation to the app.
To do it, it will send messages to the app, using pre-defined methods, which will allow to pass arguments between its
pages.
1. Method : navigate.push
The push navigation is the basic transition (left to right) between two pages of your app. It is typically used to navigate
from a list of content to the detail view of an item.
Parameters to be passed in the URL :
- page : the .html file to link to, has to be in your plugin's bundle
It is also possible to intergrate POST parameters in your request, that will be accessible in the destination page as
JavaScript variables.
To pass POST arguments with a JavaScript navigation, use the GBJSToolKit.
Example of navigation without POST parameters:
<a href="goodbarber://navigate.push?page=detail">Go to the detail page</a>
Exemple of navigation with POST parameters, using the GB JS ToolKit:
<a href="javascript:gbPost('goodbarber://navigate.push?page=detail',{'mydata':'Example data'});">Go to the detail
page</a>
2. Method : navigate.modal
The modal navigation is a vertical transition mode between two pages of your app. It is typically used to enter a settings
screen.
Parameters to be passed in the URL :
- page : the .html file to link to, has to be in your plugin's bundle
It is also possible to intergrate POST parameters in your request, that will be accessible in the destination page as
JavaScript variables.
To pass POST arguments with a JavaScript navigation, use the GBJSToolKit.
Example of navigation without POST parameters:
3. Method : navigate.back
When your plugin has made a navigation to another page, it is possible to go back manually.
To do it, you have to call the navigate.back method, without arguments or parameters.
Exemple of back navigation:
<a href="goodbarber://navigate.back">Go to the previous page</a>
1. Method : request
The request method simply allows you to request access to a remote resource.
You must specify the following parameters:
- url: The URL of the resource you wish to access (must be URL encoded)
- tag: a tag (integer) to identify your request
YES
if
you
wish
to
receive
a
cached
version
if
cache:
callback gbRequestDidSuccessWithCache, otherwise NO
- method: (optional) the HTTP method will be used in the request (default value: GET)
there
is
one,
via
the
You may call this method with POST parameters, that will also be passed on to the body of the request.
Example of the download of a JSON stream in GET with a request for a cached version, if there is one:
<a
href="goodbarber://request
?url=http%3A%2F%2Fwww.monsite.com%2F/monjson.com&tag=1&cache=YES">Tlcharger le JSON</a>
Example of the download of an image in GET without callback for a cached version:
<a
href="goodbarber://request
?url=http%3A%2F%2Fwww.monsite.com%2F/monimage.jpg&tag=2&cache=NO">Tlcharger l'image</a>
2. Request pathway
3. Callback : gbRequestDidFail
The callback gbRequestDidFail is called if the request fails. It is strongly recommended to implement this callback
method to correctly handle request fails.
The method must include three parameters:
- tag : the tag (integer) defined at the call of the request
- errorCode : 0 if there is a network problem, the HTTP error code otherwise
- errorMessage : a description of the problem leading to the request failure
4. Callback : gbRequestDidSuccessWithCache
The callback gbRequestDidSuccessWithCache is called immediately before the beginning of the HTTP request if the
called resource is present in the application's cache (and the request was called with the cache parameter set to YES).
The method to be implemented must contain three parameters:
- tag: the tag (integer) defined at the request call
- data: the raw data of the resource
- src: the pathway to the resource in the file system
5. Callback : gbRequestDidSuccess
The callback gbRequestDidSuccess is called in case of a success of the HTTP request.
The method to be implemented must contain three paramters:
- tag: the tag (integer) defined at the request call
- data: the raw data of the resource
- src: the pathway to the resource in the file system
2. 2. 5. Other methods
In your HTML5 plugin for GoodBarber, you can use methods that allow you to access a certain number of "advanced"
features of the application or terminal.
The majority of these methods send a JavaScript callback indicating the success or failure of the method.
1. Method : authenticate
You may request that users identify themselves to access a feature, through an "authenticate" method call. In this
instance, you may specify which services (Facebook or Twitter) you wish to use for authentication.
Arguments in the URL:
|facebook|twitter
- skip: possible values:: YES (by default, allows the user to abandon the
login process) | NO (force the user to log in)
- services: possible values: all (by default)
If the value "all" is given for the services parameter, a transparent design is added to plugin view to ask the user through
which service they wish to authenticate. If the parameter skip is not given (or set to YES), a button will allow the user to
abandon the login. If the value is NO, the user will be forced to choose a service to log in.
If the user is already logged in to the app through at least one of the services in the application, the login action will be
transparent.
When the authentication process is finished, two callbacks can be called:
- gbDidSuccessAuthentication ( socialUser )
- gbDidFailAuthentication ( errorMessage )
Example of an authentication request through one of the services (without distinction)
<a href="goodbarber://authenticate?services=all">S'authentifier</a>
Example of an authentication request through Facebook only:
<a href="goodbarber://authenticate?services=facebook">S'authentifier via Facebook</a>
Example of an authentication request via one of the services (without distinction, authentication mandatory):
<a href="goodbarber://authenticate?services=all&skip=NO">S'authentifier</a>
2. Callback : gbDidSuccessAuthentication
The callback gbDidSuccessAuthentication is called if the authentication succeeded. The parameters regarding the user
are stored as a callback parameter, via a dictionary.
3. Callback : gbDidFailAuthentication
The callback gbDidFailAuthentication is called if the authentication fails (typically if the user has not consented to the
authentication).
The method to be implemented must contain a parameter:
- errorMessage: a message describing the cause of the authentication failure
4. Method : share
You may use the share method to make sharing content in the social networks easy for your users, directly from the
sharing module integrated into your GoodBarber app.
Arguments passs dans l'URL :
- text : le texte partager (doit tre URL encod)
- link : (optionnel) le lien partager (doit tre URL encod)
Arguments in the URL:
- text: the text to be shared (must be URL encoded)
- link (optional): the link to be shared (must be URL encodedExample of a share module with text:
<a href="goodbarber://share?text=Hello%20from%20my%20plugin%20!">Partager un texte</a>
Example of a share module with text and a link :
<a href="goodbarber://share?text=Hello%20from%20my%20plugin%20!&link=http%3A%2F%2Fwww.goodbarber.com">
Partager un texte et un lien</a>
5. Method : getmedia
The getmedia method allows you to call a terminal to obtain a photo or a video. You may restrict the type of content that
you wish to obtain via this method, as well as the source (direct capture or choice in the albums).
Arguments in the URL :
- type : possible values : photo (by default) | video
- source : possible values : all (by default) | camera | library
If the value of the parameter source is left empty or set to "all" (default value), a menu will ask the user to choose if they
wish to take a photo (or video) directly, or if they wish to choose one from an album. The value of the parameter type is
transparent to the user: the user can only choose the corresponding media in the selection menu.
6. Callback : gbDidSuccessGetMedia
The callback gbDidSuccessGetMedia is called if the media retrieval was successful.
The method to implement must comprise two parameters:
- data: the raw image or video data
- src: the pathway to the resource on the drive
7. Callback : gbDidFailGetMedia
Le callback gbDidFailGetMedia est appel si la capture du media a chou.
La mthode implmenter doit comporter un paramtre :
- errorMessage : un message dcrivant la cause de l'chec
The callback gbDidFailGetMedia is called if the media retrieval failed.
The method to be implemented must contain a parameter:
- errorMessage: a message describing the reasons for failure.
8. Method : getlocation
The method getlocation allows you to call the terminal to obtain the user's geolocation data. This method does not
require any arguments.
It may send one of two callbacks:
- gbDidSuccessGetLocation ( lat, long)
- gbDidFailGetLocation (errorMessage)
9. Callback : gbDidSuccessGetLocation
The callback gbDidSuccessGetLocation is called if the geolocation of the user succeeded.
The method to be implemented must contain two parameters:
- lat: latitude of the user
- long: longitude of the user
The method gettimezoneoffset allows you to call the terminal to get the time difference between UTC time and local
time, in minutes.
- offset: time difference between UTC time and local time, in minutes
2. 2. 6. Events callbacks
Events callbacks are called by your plugin as a function of the App Lifecycle and the user's actions (when content is
shown, when the app goes into background mode or is retrieved from background mode, etc.)
They are designed to help you manage the display of your content at the right time. Even if they are not useful all the
time, it is nevertheless recommended to implement them to optimize the user experience.
1. Callback : gbAppWillEnterBackground
The callback gbAppWillEnterBackground is called when app goes into background mode.
Example of implementation:
function gbAppWillEnterBackground()
{
// Do something
}
2. Callback : gbAppDidBecomeActive
The callback gbAppDidBecomeActive is called when the app comes back from background mode.
Example of implementation:
function gbAppDidBecomeActive()
{
// Do something
}
3. Callback : gbPluginDidLoad
The callback gbPluginDidLoad is called when the plugin finishes loading.
Example of implementation :
function gbPluginDidLoad()
{
// Do something
}
4. Callback : gbViewDidLoad
The callback gbViewDidLoad is called when the current view finishes downloading.
Implementation example:
function gbViewDidLoad()
{
// Do something
}
5. Callback : gbViewWillAppear
The callback gbViewWillAppear is called just before the current view is displayed on the screen.
Implementation example:
function gbViewWillAppear()
{
// Do something
}
6. Callback : gbViewDidAppear
The callback gbViewDidAppear is called just after the current view is displayed on the screen.
Implementation example:
function gbViewDidAppear()
{
// Do something
}
7. Callback : gbViewWillDisappear
The callback gbViewWillDisapper is called just before the current view disappears from the screen.
Implementation example:
function gbViewWillDisappear()
{
// Do something
}
8. Callback : gbViewDidDisappear
The callback gbViewDidDisappear is called just after the current view disappears from the screen.
Implementation example :
function gbViewDidDisappear()
{
// Do something
}
In the HTML code of the of the pages of the plugin that require it, add this line to the HEAD tag.
<script language="JavaScript" src="./GBJSTK.js"></script>
Values :
- 0 : Production mode
- 1 : Alerts before any request
- 2 : Alerts before any request + stop requests
2. Function : gbIsEmpty
This function tests if an object is empty.
Arguments :
- obj : The action of the form
Return :
- true : if the object is empty
- false : otherwise
3. Function : gbConstructQueryString
This function constructs a query string using the "params" dictionary.
Arguments :
- params : The params to construct the query string
Return :
The constructed query string
4. Function : gbPostRequest
This function creates a form in document.body and sends a POST request to "path" using "getParams" and
"postParams".
Arguments :
- path : The action of the form
- params : The parameters to send in the request body
5. Function : gbGetRequest
This function launches a navigation to "path" setting "params" as GET arguments.
Arguments :
- path : The destination path
- params : (optional) The params to send in the request body
6. Function : gbMailto
Launches the mail composer.
Arguments :
- to : The destination address
- subject : (optional) The mail subject
- body : The (optional) mail content
7. Function : gbTel
Launches a call.
Arguments :
- phoneNumber : The number to call
8. Function : gbSms
Launches the SMS composer.
Arguments :
- phoneNumber : The number to send a text to
9. Function : gbMaps
Launches the Maps native application.
Arguments :
- params : The parameters to pass in the query string
Arguments :
- scheme : The URL scheme to test
- url : The URL to launch otherwise
Arguments :
- page : The destination page
- postParams : The postParams to give to the destination page
Arguments :
- resourceUrl : The url of the resource to load
- tag : A tag to identify the request
- cache : YES if you want to use the app's cache mechanism, NO otherwise
- requestMethod : The HTTP method you want to use for the request
- postParams : If method==POST, you can pass HTTP Post Params in your request
Callbacks :
- gbRequestDidFail ( tag, errorCode, errorMessage )
- gbRequestDidSuccessWithCache ( tag, data, src )
- gbRequestDidSuccess ( tag, data, src )
Arguments :
- services : The services to use for the authentication | values : [all(default)|facebook|twitter]
- skip : Give the user the possibility to skip the authentication process | values : [YES(default)|NO]
Callbacks :
- gbDidSuccessAuthentication ( socialUser )
- gbDidFailAuthentication ( errorMessage )
Callbacks :
- gbDidSuccessGetTimezoneOffset( offset )
1. Objective
In this example, we want to create a plugin with three pages:
- The main page (index.html)
- A detail page (detail.html)
- A modal page (modal.html)
The main page (index.html) will comprise two clickable zones triggering a navigation: one towards the detail page (in
push navigation) and one to the modal page (in modal navigation).
Each of the two targeted pages (detail.html and modal.html) will contain a zone that will trigger a return within the
navigation hierarchy (back navigation).
4. 3. Result
You can now easily test the navigation by downloading this sample plugin from GoodBarber's GitHub page, or by
following the steps outlined in paragraphs 1 and 2.
Le plugin n'a pas vocation implmenter une navigation car il se contente d'afficher 3 informations sur une seule page,
on ne retrouve donc que la page index.html.
This plugin won't implement a navigation as it is only intended to display three different types of information on one
page, therefore, one will not find the page index.html.
We have a CSS sheet (style.css), as well as several images for the plugin (in the following formats: .gif, .png, and .jpg).
Finally, there are two JavaScript files: The GoodBarber JavaScript ToolKit (GBJSTK.js) and the file of functions specific
to the plugin (plugin.js).
Please note: In order to ensure the optimal showing regardless of different screen types (particularly Retina and nonRetina screens) we have used media queries in the CSS sheet. By convention, the images in double size (for Retina
screens) carry the suffix "@2x", just like with native developments.
The operation of this plugin is relatively simple: Once it's instantiated, it will trigger it's refresh method, which will send a
cascade request to obtain the geolocation of the user.
If this request is successful, a request will be sent to the Weather Underground API.
If the API works correctly, the page will be refreshed with the current information. Otherwise, the user will be informed
that an error has occurred during the update process.
A click on the refresh button will re-start the refresh process.
3. Content API
3. 1. Content API Overview
3. 1. 1. Content API Overview
The GoodBarber Content API allows you to access the content synchronized form the different sources that you have
plugged in your sections.
The Content API is built on a REST architecture. On each source, it's possible to call different methods, each meeting a
specific need.
The Content API requests are secured and can be called only from the app itself (or by a plugin in the app). To
facilitate your tests, you can use an API Console in your backend.
The auth management in the Content API is handled automatically by the request method of the GoodBarber Plugin
API.
The Content API endpoints allow you to access the content synced in your GoodBarber backend.
Some sources allow only basic endpoints. To get the precise list of available endpoints for each source, have a look to
the list of sources of your app.
1. /getLastItems
The /getLastItems endpoint returns a list of items from the source plugged in the section "section_id", in a reverse
chronological order, and using the page and per_page parameters.
Args :
- section_id : the section id of the section connected to the source
- page : page to call, calculated using per_page
- per_page : number of items to return for this page
Call structure :
/getLastItems/[section_id]/[page]/[per_page]/
2. /getPopularItems
The /getPopularItems endpoint returns a list of items from the source plugged in the section "section_id", in a popularity
order, and using the page and per_page parameters.
Args :
- section_id : the section id of the section connected to the source
- page : page to call, calculated using per_page
- per_page : number of items to return for this page
Call structure :
/getPopularItems/[section_id]/[page]/[per_page]/
3. /search
The /search endpoint returns a list of items from the source plugged in the section "section_id", filtered using the
keyword arg, and using the page and per_page parameters.
Args :
- section_id : the section id of the section connected to the source
- keyword : keyword to search (has to be url encoded)
- page : page to call, calculated using per_page
- per_page : number of items to return for this page
Call structure :
/search/[section_id]/[keyword]/[page]/[per_page]/
4. /getItem
The /getItem endpoint returns the item having the id item_id on the connected source of the section section_id.
Args :
- section_id : the section id of the section connected to the source
- item_id : id of the item to return
Call structure :
/getItem/[section_id]/[item_id]/
5. /getItemByUrl
The /getItemByUrl endpoint returns the item having the url item_url on the connected source of the section section_id.
Args :
- section_id : the section id of the section connected to the source
- item_url : URL of the item to return
Call structure :
/getItemByUrl/[section_id]/[item_url]/
6. /getCategories
The /getCategories endpoint returns the list of categories of the connected source of the section section_id, using the
page and per_page parameters.
Args :
- section_id : the section id of the section connected to the source
- page : page to call, calculated using per_page
- per_page : number of items to return for this page
Call structure :
/getCategories/[section_id]/[page]/[per_page]/
7. /getItemsByCategorie
The /getItemsByCategorie endpoint returns a list of items from the source plugged in the section "section_id", filtered
using the category_id arg, and using the page and per_page parameters.
Arguments :
- section_id : the section id of the section connected to the source
- category_id : id of the category
- page : page to call, calculated using per_page
- per_page : number of items to return for this page
Call structure :
/getItemsByCategorie/[section_id]/[category_id]/[page]/[per_page]/
2. Keys
Name
generated_in
items
next_page
Type
String
Array of Items
String
stat
String
title
String
Description
Generation time of the response
Array of items to be returned
URL of the next_page to call
(calculated with the page and per_page
args)
Status of the response ("ok" is
everything is fine, "error" otherwise)
Title of the source
url
String
1. Item (common)
Generic Item type, every other type inherits from Item.
Name
id
type
title
url
categories
Type
String
String
String
String
Array of Strings
date
author
subtype
String (date)
String
String
Description
Item unique identifier on its source
Item type
Item title
Item URL on its source
Categories associated with the item on
the source
Item publication date
Item author
Item subtype (generally describes the
service type of the source)
2. Article
Inherited from Item, can be displayed in Article sections.
type = article
subtype = wordpress, typepad, wmaker, rss, etc.
Name
nbComments
Type
Integer
commentsEnabled
Bool
commentsUrl
String
commentsPostUrl
String
summary
String
content
smallThumbnail
thumbnail
largeThumbnail
images
images/[]/id
String
String
String
String
Array of Dict
String
images/[]/url
String
Specifications to follow are described here : Articles sources.
Description
Number of comments associated with
the item on its source
Describes if the comments have to be
enabled or not for this item
URL to access the JSON feed of
comments for this item
URL that allows to post comments on
this item
Summary of the article (no HTML, text
only)
Article content
Article thumbnail (small format)
Article thumbnail (medium format)
Article thumbnail (big format)
List of images contained in the article
Value of the id attribute of the <img>
tags in article content
Image URL
3. Photo
Inherited from Item, can be displayed in Photo sections.
type = photo
subtype = flickr, facebook, wmaker, picasa, etc.
Name
content
nbLikes
Type
String
Integer
Description
Photo description (text only, no HTML)
Number of likes of the photo (only if
nbComments
commentsEnabled
Integer
Bool
commentsUrl
String
commentsPostUrl
String
images
Dict
images/{SIZE}/height
images/{SIZE}/width
images/{SIZE}/url
Indicative values of {SIZE}
Value
square
largesquare
small
medium
large
Integer
Integer
String
subtype = facebook)
Number of comments
Describes if the comments have to be
enabled or not for this item
URL to access the JSON feed of
comments for this item
URL that allows to post comments on
this item
Dictionary of the different sizes
available for the photo
Height of the photo
Width of the photo
URL of the photo
Description
Small format (square)
Medium format (square)
Small format (original proportions)
Medium format (original proportions)
Big format (original proportions)
Indicative values
75x75
150x150
240x180
320x240
640x480
4. Vido
Inherited from Item, can be displayed in Video sections.
type = video
subtype = youtube, dailymotion, vimeo, wmaker, facebook, etc.
Name
nbComments
commentsEnabled
Type
Integer
Bool
commentsUrl
String
commentsPostUrl
String
content
summary
String
String
smallThumbnail
thumbnail
largeThumbnail
nbViews
length
rating
nbRatings
videoUrls
String
String
String
Integer
Integer
Float
Integer
Dict
videoUrls/{VIDEO_TYPE}
String
videoUrl
String
nbLikes
Integer
image
String
Description
Number of comments
Describes if the comments have to be
enabled or not for this item
URL to access the JSON feed of
comments for this item
URL that allows to post comments on
this item
Video description
Summary of the video (no HTML, text
only)
Video thumbnail (Small format)
Video thumbnail (Medium format)
Video thumbnail (Big format)
Number of views of the video
Video duration (seconds)
Medium rating of the video
Number of ratings of the video
Dictionary containing the different
formats for the video source
URL of the video resource
corresponding to {VIDEO_TYPE}
URL to watch the video (only if
subtype = facebook)
Number of likes of the video (only if
subtype = facebook)
Video original thumbnail URL (only if
subtype = facebook)
Description
URL of the HTTP Streaming feed
URL of the MP4 file
URL that could be indicated as the
source of an HTML embed to watch the
Format
Apple HTTP Streaming
MP4
HTML embed
embedHTML
video
HTML full embed code of the video
HTML embed
5. Event
Inherited from Item, can be displayed in Event sections.
type = event
subtype = facebook, google, wmaker, etc.
Name
address
allDay
Type
String
Bool
content
endDate
latitude
String
String (date)
String
longitude
String
thumbnail
String
Description
Address of the event
Describes if the event is an "all day"
event
Event description
End date of the event
Latitude of the event (GPS
coordinates)
Longitude of the event (GPS
coordinates)
Thumbnail of the event
6. Sound
Inherited from Item, can be displayed in Sound sections.
type = sound
subtype = podcast, soundcloud, etc.
Name
nbComments
commentsEnabled
Type
Integer
Bool
commentsUrl
String
commentsPostUrl
String
length
nbFavorites
Integer
Integer
purchaseUrl
streamUrl
summary
thumbnail
String
String
String
String
Description
Number of comments
Describes if the comments have to be
enabled or not for this item
URL to access the JSON feed of
comments for this item
URL that allows to post comments on
this item
Duration of the podcast (seconds)
Number of "favorites" by user for this
song (only if subtype = soundcloud)
URL to buy the song
Stream URL for this podcast
Description of this podcast
Thumbnail URL
7. Twitter
Inherited from Item, can be displayed in Twitter sections.
type = twitter
subtype = twitter
Name
authorAccount
since
Type
String
Integer
content
thumbnail
String
String
8. Facebook - Page
Not-inherited type, used as header for Facebook sections.
type = facebook_page
subtype = facebook
Description
Author's twitter account for this tweet
Time spent since the publication of
this tweet (seconds)
Tweet content
Tweet thumbnail URL (generally,
author's profile picture)
Name
author
categories
Type
String
String
content
cover
founded
String
String
String
id
nbLikes
subtype
thumbnail
title
type
url
urlScheme
String
Integer
String
String
String
String
String
String
Description
Page username
Page category (has to be a Facebook
category)
Page description
Cover picture URL
Creation date as filled on the
Facebook page settings
Facebook profile identifier
Number of likes on the Page
In this case, always "facebook"
Profile picture URL
Name of the Facebook page
In this case, always "facebook_page"
Page URL
Deep URL to access the Facebook
page in the iOS Facebook app
9. Link
Inherited from Item, can be displayed in Facebook sections (link items).
type = link
subtype = facebook, etc.
Name
nbComments
nbLikes
thumbnail
caption
description
link
Type
Integer
Integer
String
String
String
String
Description
Number of comments
Number of likes
Thumbnail URL for this link
Link caption
Link description
Link target (URL)
10. Status
Inherited from Item, can be displayed in Facebook sections (status items).
type = status
subtype = facebook, etc.
Name
nbComments
nbLikes
content
Type
Integer
Integer
String
Description
Number of comments
Number of likes
Status content
11. Comment
Inherited from Item, can be displayed in comment pages.
type = comment
subtype = wordpress, wmaker, etc.
Name
content
Type
String
Description
Content of the comment
Type
String
String
Description
Artist name
Song's title
cover
duration
albumTitle
year
String
Integer
String
Integer
2. Summary
The summary attribute content will be displayed at the list level in the app.
3. Thumbnail management
The article items return 3 thumbnails formats, that will be chosen by the app according to the active list template. Here
are some indicative sizes:
- smallThumbnail : 158x82
- thumbnail : 314x164
- largeThumbnail : original size of the image
3. 3. 2. Video sources
The Video sources (YouTube, Dailymotion, Vimeo, WMaker, etc.), that can be displayed in Video sections have several
specificities in their Content API responses.
In each case, an Article source should return only items having an "video" type, and the subtype can vary (ex:
"youtube", "dailymotion", "wmaker", etc.).
2. Thumbnails management
The video items return 3 thumbnails formats (in 16/9 ratio), that will be chosen by the app according to the active list
template. Here are some indicative sizes:
- smallThumbnail : 179x100
- thumbnail : 300x168
- largeThumbnail : original size of the image
For each source type, it's possible to define several types of actions:
- getLastItems => get the last items published, or items for a specific filter (like categories filters)
- search => takes a [KEYWORD] argument to make a search in the website's content
- getCommentsByItem => get the comments associated to an item
NB : The names getLastItems, search, getItemByCategorie, getCommentsByItem described in the documentation are
the conventions that we use.
When you add a custom source, you'll have to enter the whole URL to access your custom feeds, so it's not mandatory
to respect this naming convention.