woob.capabilities.calendar

class BaseCalendarEvent(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

Represents a calendar event

Variables:
  • url – (str) url

  • start_date – (date, datetime) Start date of the event

  • end_date – (date, datetime) End date of the event

  • timezone – (str) Timezone of the event in order to convert to utc time (default: Etc/UCT)

  • summary – (str) Title of the event

  • address – (PostalAddress) Address where event will take place

  • category – (str) Category of the event

  • description – (str) Description of the event

  • price – (float) Price of the event

  • booked_entries – (int) Entry number

  • max_entries – (int) Max entry number

  • event_planner – (str) Name of the event planner

  • sequence – (int) Number of updates, the first is number 1

  • status – (str) Status of the event

  • transp – (str) Describes if event is available

  • ticket – (str) Describes if tickets are available

property city
property location
classmethod id2url(_id)[source]

Overloaded in child classes provided by backends.

property page_url

Get page URL of the announce.

class CapCalendarEvent[source]

Bases: CapCollection

Capability of calendar event type sites

ASSOCIATED_CATEGORIES = 'ALL'
has_matching_categories(query)[source]
search_events(query)[source]

Search event

Parameters:

query (Query) – search query

Return type:

iter[BaseCalendarEvent]

list_events(date_from, date_to=None)[source]

list coming event.

Parameters:
  • date_from (date) – date of beguinning of the events list

  • date_to (date) – date of ending of the events list (default: None)

Return type:

iter[BaseCalendarEvent]

get_event(_id)[source]

Get an event from an ID.

Parameters:

_id (str) – id of the event

Return type:

BaseCalendarEvent or None is fot found.

attends_event(event, is_attending=True)[source]

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

iter_resources(objs, split_path)[source]

Iter events by category

validate_collection(objs, collection)[source]

Validate Collection