ContentCode Web Service 1.0
Contenidos
Info
The use of the ContentCode is linked to the MySMartphone App. The functionality is explained here.
Remark: This is a RouteYou+ service. Please contact sales[at-r.] if you want to make use of this service and you don't have yet an agreement with RouteYou.
- Service name: ContentCode
- Version: 1.0
Technical
The web service is accessible using:
- XML-RPC: Info on how to use
- JSONP: Info on how to use
- JSON-RPC: Info on how to use
Overview of provided functions
get
Get content linked to a code
Input
- code (String): get the content with the given code (case insensitive)
Output
- data (Object|null): the array under the key content specifies the conditions an object has to meet. For now it is only possible to specify conditions for routes.
Possible conditions: user, group, theme, characteristic, showPrivate.
When a code is not found, null is returned. When number of request of a code is exceeded, an exception with code 7401 (Permission denied) is thrown.
Example output
array (
'content' =>
array (
'route' => //below the conditions routes have to meet
array (
'user' => //owner of route has to be in array
array (<userId1>),
'group' => //route has to be linked to a group in array
array(<groupId1>, <groupId2>),
'theme' => //route has to be linked to a theme in the array
array (<themeId1>),
'characteristic' => //route has to be linked to a characteristic in the array
array (<characterId1>, <characterId2>),
'includePrivate' => true //Private routes are also shown.
),
),
)
search
Get the conten codes that meet the conditions. When you want all the content codes, don't pass any parameters.
Input
- conditions(s) (Struct|null):
- sorting (String|Array): determines the order of the content codes. When there are multiple sorting criteria, an array is necessary.
Possible sortings:- code[ASC|DESC]
- createdDate[ASC|DESC]
- score [ASC|DESC]
- owner.id [ASC|DESC]
- viewCount [ASC|DESC]
- viewCountThisMonth [ASC|DESC]
- limit (Integer): maximum number of content codes returned
- offset (Integer): number of content code to skip
Output
- content code(s) (Array(Object)): an array of content codes in the passed order is returned