Difference between revisions of "Template:Api DataType Spec"

From Gvp-public
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{{Description}}} === Members === {{{Members}}} === Example === {{{Example}}} == Known issues == {{{KnownIssues}}} == Version history == {{{VersionHistor...")
 
Line 4: Line 4:
 
=== Members ===
 
=== Members ===
  
{{{Members}}}  
+
{{{!}} border="2" style="width:800px"  cellspacing="0" cellpadding="10"
  
 +
{{!}}- style="background:#88ccff;font-size:110%"
 +
! Field
 +
! Data Type
 +
! Description
 +
{{!}}- valign="top"
 +
 +
! TagValue
 +
{{!}} int
 +
{{!}}  Movie ID (in the case of series it will be the ID of the "movie" object -of series type- referring the whole series)
 +
{{!}}- valign="top"
 +
 +
! TagType
 +
{{!}} Array of [TagType]
 +
{{!}} Array of tags "active" for the object (for example, a movie may have tags "''watched''" + "''completed''" + "''favorite''")
 +
{{!}}- valign="top"
 +
 +
! ResumeValue
 +
{{!}} int
 +
{{!}} It will contain the resume time value (for objects with "watched" started but not totally "completed"), or "-1" if completed.
 +
:* if the object is a movie, it will contain the resume value of the movie
 +
:* if the object is a series, it will contain the resume value for the "next episode" (the next episode will be returned in the SimpleMovie object)
 +
:* if the "resume value" for a "not completed" content is not available (since MongoDB only stores resume data for a limited set of contents), it will return "0" as the resume value (indicating not available)
 +
{{!}}- valign="top"
 +
 +
! TaggedContent
 +
{{!}} [SimpleMovie]
 +
{{!}}
 +
:* For individual movies, it will contain the SimpleMovie object for the requested tag/ID
 +
:* In the case of series, it will contain the SimpleMovie object for the "next episode", according to this logic: Check for all available episodes to find the highest Season and Episode already watched (completed or resume):
 +
:* if episode is in "resume" (watched), that episode is returned as "next"
 +
::* if episode is "completed", it returns the next available episode (next one within season or first one of next season)
 +
::* if there is not available (new) episode, it does not return anything (Series Completed; meaning that series is completed so far)
 +
::* if there is not any episode already watched, it returns the available episode with highest Season and Episode
 +
::*etc
 +
{{!}}- valign="top"
 +
 +
{{!}}}
 +
 +
 +
|Example=
 +
 +
{
 +
:        "ID": 13939,
 +
:        "SeriesId": 0,
 +
:        "SeriesName": "",
 +
:        "SeasonId": 0,
 +
:        "SeasonNumber": 0,
 +
:        "Type": 1,
 +
:        "Title": "_Bem-vindo ao canal Adulto",
 +
:        "Duration": 60,
 +
:        "Year": 0,
 +
:        "AgeRating": {
 +
::          [[InstanceAgeRating]] object
 +
:        },
 +
:        "Subtitles": [
 +
::          Array of [[Subtitle]] object
 +
:        ],
 +
:        "Genres": [
 +
::          Array of [[Genre]] objects
 +
:        ],
 +
:        "Stars": 2.81818181818182,
 +
:        "Views": 235,
 +
:        "ShortDescription": "Bem-vindo ao canal ...",
 +
:        "Images": [
 +
::          Array of [[Image]] object
 +
:        ],
 +
:        "ResizableImages": [
 +
::          Array of [[Image]] object
 +
:        ],
 +
:        "RequiresPin": true,
 +
:        "ChildrenCount": 0,
 +
:        "Medias": [
 +
::          Array of [[Media]]
 +
:        ],
 +
:        "AvailableForThisDevice": true,
 +
:        "AvailableForThisDeviceInHD": true,
 +
:        "AvailableForThisDeviceInSD": true,
 +
:        "OrderEpisode": 0,
 +
:        "PlaybackAccess": 2,
 +
:        "IsDtp": false,
 +
:        "Distributor": {
 +
::            [[Distributor]] object
 +
:        },
 +
:        "CommercializationType": 4,
 +
:        "Producer": {
 +
::          [[Producer]]
 +
:        }
 +
}
  
 
=== Example ===
 
=== Example ===

Revision as of 16:19, 2 February 2015

{{{Description}}}

Members

Field Data Type Description
TagValue int Movie ID (in the case of series it will be the ID of the "movie" object -of series type- referring the whole series)
TagType Array of [TagType] Array of tags "active" for the object (for example, a movie may have tags "watched" + "completed" + "favorite")
ResumeValue int It will contain the resume time value (for objects with "watched" started but not totally "completed"), or "-1" if completed.
  • if the object is a movie, it will contain the resume value of the movie
  • if the object is a series, it will contain the resume value for the "next episode" (the next episode will be returned in the SimpleMovie object)
  • if the "resume value" for a "not completed" content is not available (since MongoDB only stores resume data for a limited set of contents), it will return "0" as the resume value (indicating not available)
TaggedContent [SimpleMovie]
  • For individual movies, it will contain the SimpleMovie object for the requested tag/ID
  • In the case of series, it will contain the SimpleMovie object for the "next episode", according to this logic: Check for all available episodes to find the highest Season and Episode already watched (completed or resume):
  • if episode is in "resume" (watched), that episode is returned as "next"
  • if episode is "completed", it returns the next available episode (next one within season or first one of next season)
  • if there is not available (new) episode, it does not return anything (Series Completed; meaning that series is completed so far)
  • if there is not any episode already watched, it returns the available episode with highest Season and Episode
  • etc


|Example=

{

"ID": 13939,
"SeriesId": 0,
"SeriesName": "",
"SeasonId": 0,
"SeasonNumber": 0,
"Type": 1,
"Title": "_Bem-vindo ao canal Adulto",
"Duration": 60,
"Year": 0,
"AgeRating": {
InstanceAgeRating object
},
"Subtitles": [
Array of Subtitle object
],
"Genres": [
Array of Genre objects
],
"Stars": 2.81818181818182,
"Views": 235,
"ShortDescription": "Bem-vindo ao canal ...",
"Images": [
Array of Image object
],
"ResizableImages": [
Array of Image object
],
"RequiresPin": true,
"ChildrenCount": 0,
"Medias": [
Array of Media
],
"AvailableForThisDevice": true,
"AvailableForThisDeviceInHD": true,
"AvailableForThisDeviceInSD": true,
"OrderEpisode": 0,
"PlaybackAccess": 2,
"IsDtp": false,
"Distributor": {
Distributor object
},
"CommercializationType": 4,
"Producer": {
Producer
}

}

Example

{{{Example}}}


Known issues

{{{KnownIssues}}}


Version history

{{{VersionHistory}}}


See also

{{{SeeAlso}}}