Favorite object

A favorite is the core object of the API.
It represent a manual action from a user that want to add an artist, a show, or an event to its list of favorites, or agenda.

Properties

A favorite contains the following 4 properties:

  • Object typeA favorite can be an artist, an event, or a show.
    • Type: Integer
      • Correspondance type / integer value
        • Event: 0
        • Show: 1
        • Artist: 2
    • Note: Ensure to read schedule API for more information on the object type, and ensure you are using the same object type on mobile and web in order to make synchronization working.
  • Object ID: The identifier related to the object type.
    • Type: Integer
    • Note: Ensure to read schedule API for more information on the object type, and ensure the object ID will never change for the same object otherwise it will break synchronization. 
  • Timestamp: The universal timestamp (date and time) when the favorite was modified (GMT and server time based).
    • Type: Integer
    • Note: This timestamp is the base for the favorite synchronization between web and mobile, managing offline mode. 
  • Is favorite: Indicates if the favorite is added or removed from the list.
    • Type: Boolean
      Note: This status is used only when updating user favorites list, and on server side storage. When retrieving the list of favorites only favorites with value "true" for the property "is_favorite" are returned. 

Note: the couple object type and object id is unique for a user.

JSON representation

The JSON representation of the object is a dictionary with the 3 properties.

{
   "object_type": integer,
   "object_id": integer,
   "timestamp": integer,
   "is_favorite": boolean
}

Sample

Sample for a favorite of type Event, with ID 1234, added on Wed, 08 May 2013 15:10:20 GMT.

{
   "object_type": 0,
   "object_id": 1234,
   "timestamp": 1368025820,
   "is_favorite": TRUE
}