weboob.capabilities.calendar

class weboob.capabilities.calendar.BaseCalendarEvent(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Represents a calendar event
Variables:
  • start_date – (date, datetime) Start date of the event
  • end_date – (date, datetime) End date of the event
  • timezone – (unicode) Timezone of the event in order to convert to utc time (default: Etc/UCT)
  • summary – (unicode) Title of the event
  • city – (unicode) Name of the city in witch event will take place
  • location – (unicode) Location of the event
  • category – (unicode, unicode, unicode, unicode, unicode, unicode, unicode, unicode, unicode, unicode) Category of the event
  • description – (unicode) Description of the event
  • price – (float) Price of the event
  • booked_entries – (int, long) Entry number
  • max_entries – (int, long) Max entry number
  • event_planner – (unicode) Name of the event planner
  • sequence – (int, long) Number of updates, the first is number 1
  • status – (unicode, unicode, unicode) Status of theevent
  • transp – (unicode, unicode) Describes if event is available
  • ticket – (unicode, unicode, str) Describes if tickets are available
classmethod id2url(_id)

Overloaded in child classes provided by backends.

page_url

Get page URL of the announce.

class weboob.capabilities.calendar.CapCalendarEvent

Bases: weboob.capabilities.collection.CapCollection

Capability of calendar event type sites

ASSOCIATED_CATEGORIES = 'ALL'
attends_event(event, is_attending=True)

Attends or not to an event :param event : the event :type event : BaseCalendarEvent :param is_attending : is attending to the event or not :type is_attending : bool

get_event(_id)

Get an event from an ID.

Parameters:_id (str) – id of the event
Return type:BaseCalendarEvent or None is fot found.
has_matching_categories(query)
iter_resources(objs, split_path)

Iter events by category

list_events(date_from, date_to=None)

list coming event.

Parameters:
  • date_from (date) – date of beguinning of the events list
  • date_to (date) – date of ending of the events list
Return type:

iter[BaseCalendarEvent]

search_events(query)

Search event

Parameters:query (Query) – search query
Return type:iter[BaseCalendarEvent]
validate_collection(objs, collection)

Validate Collection