Les aides en ligne de GoodBarber
Item types documentation
Each entry returned by the GoodBarber Content API is formatted on a generic Item dictionary type.
The Item entries have common keys, and specific additional keys according to their type and subtype.
In the list below, for the specific types (articles, videos, etc.) inherited from Item, only the additional keys described.
Item (common)
Generic Item type, every other type inherits from Item.
Name | Type | Description |
id | String | Item unique identifier on its source |
type | String | Item type |
title | String | Item title |
url | String | Item URL on its source |
categories | Array of Strings | Categories associated with the item on the source |
date | String (date) | Item publication date |
author | String | Item author |
subtype | String | Item subtype (generally describes the service type of the source) |
Article
Inherited from Item, can be displayed in Article sections.
type = article
subtype = wordpress, typepad, wmaker, rss, etc.
Name | Type | Description |
nbComments | Integer | Number of comments associated with the item on its source |
commentsEnabled | Bool | Describes if the comments have to be enabled or not for this item |
commentsUrl | String | URL to access the JSON feed of comments for this item |
commentsPostUrl | String | URL that allows to post comments on this item |
summary | String | Summary of the article (no HTML, text only) |
content | String | Article content |
smallThumbnail | String | Article thumbnail (small format) |
thumbnail | String | Article thumbnail (medium format) |
largeThumbnail | String | Article thumbnail (big format) |
images | Array of Dict | List of images contained in the article |
images/[]/id | String | Value of the id attribute of the <img> tags in article content |
images/[]/url | String | Image URL |
Specifications to follow are described here : Articles sources.
Photo
Inherited from Item, can be displayed in Photo sections.
type = photo
subtype = flickr, facebook, wmaker, picasa, etc.
Name | Type | Description |
content | String | Photo description (text only, no HTML) |
nbLikes | Integer | Number of likes of the photo (only if subtype = facebook) |
nbComments | Integer | Number of comments |
commentsEnabled | Bool | Describes if the comments have to be enabled or not for this item |
commentsUrl | String | URL to access the JSON feed of comments for this item |
commentsPostUrl | String | URL that allows to post comments on this item |
images | Dict | Dictionary of the different sizes available for the photo |
images/{SIZE}/height | Integer | Height of the photo |
images/{SIZE}/width | Integer | Width of the photo |
images/{SIZE}/url | String | URL of the photo |
Indicative values of {SIZE}
Value | Description | Indicative values |
square | Small format (square) | 75x75 |
largesquare | Medium format (square) | 150x150 |
small | Small format (original proportions) | 240x180 |
medium | Medium format (original proportions) | 320x240 |
large | Big format (original proportions) | 640x480 |
Vidéo
Inherited from Item, can be displayed in Video sections.
type = video
subtype = youtube, dailymotion, vimeo, wmaker, facebook, etc.
Name | Type | Description |
nbComments | Integer | Number of comments |
commentsEnabled | Bool | Describes if the comments have to be enabled or not for this item |
commentsUrl | String | URL to access the JSON feed of comments for this item |
commentsPostUrl | String | URL that allows to post comments on this item |
content | String | Video description |
summary | String | Summary of the video (no HTML, text only) |
smallThumbnail | String | Video thumbnail (Small format) |
thumbnail | String | Video thumbnail (Medium format) |
largeThumbnail | String | Video thumbnail (Big format) |
nbViews | Integer | Number of views of the video |
length | Integer | Video duration (seconds) |
rating | Float | Medium rating of the video |
nbRatings | Integer | Number of ratings of the video |
videoUrls | Dict | Dictionary containing the different formats for the video source |
videoUrls/{VIDEO_TYPE} | String | URL of the video resource corresponding to {VIDEO_TYPE} |
videoUrl | String | URL to watch the video (only if subtype = facebook) |
nbLikes | Integer | Number of likes of the video (only if subtype = facebook) |
image | String | Video original thumbnail URL (only if subtype = facebook) |
Possible keys for {VIDEO_TYPE}
Value | Description | Format |
m3u8 | URL of the HTTP Streaming feed | Apple HTTP Streaming |
mp4 | URL of the MP4 file | MP4 |
embed | URL that could be indicated as the source of an HTML embed to watch the video | HTML embed |
embedHTML | HTML full embed code of the video | HTML embed |
Event
Inherited from Item, can be displayed in Event sections.
type = event
subtype = facebook, google, wmaker, etc.
Name | Type | Description |
address | String | Address of the event |
allDay | Bool | Describes if the event is an "all day" event |
content | String | Event description |
endDate | String (date) | End date of the event |
latitude | String | Latitude of the event (GPS coordinates) |
longitude | String | Longitude of the event (GPS coordinates) |
thumbnail | String | Thumbnail of the event |
Sound
Inherited from Item, can be displayed in Sound sections.
type = sound
subtype = podcast, soundcloud, etc.
Name | Type | Description |
nbComments | Integer | Number of comments |
commentsEnabled | Bool | Describes if the comments have to be enabled or not for this item |
commentsUrl | String | URL to access the JSON feed of comments for this item |
commentsPostUrl | String | URL that allows to post comments on this item |
length | Integer | Duration of the podcast (seconds) |
nbFavorites | Integer | Number of "favorites" by user for this song (only if subtype = soundcloud) |
purchaseUrl | String | URL to buy the song |
streamUrl | String | Stream URL for this podcast |
summary | String | Description of this podcast |
thumbnail | String | Thumbnail URL |
Comment
Inherited from Item, can be displayed in comment pages.
type = comment
subtype = wordpress, wmaker, etc.
Name | Type | Description |
content | String | Content of the comment |