vbbHelper

class vbbpy.vbbHelper.VbbHelper

A helper class for the library.

static fetchRequest(requestString: str, queryParams: dict)

Sends the request.

Parameters
  • requestString – The base url with an endpoint

  • queryParams – a dictionary containing optional query arguments

Returns

a response for the request, or None on Error

static getDateTimeHourMinuteString(dt: str, delay: int = 0) str

Makes a string containing hour and minute of a given datetime. :param dt: datetime string to calculate string for :param delay: a possible delay (in seconds) to add to datetime before making the string :return: hh:mm formatted string of datetime time

static getMinutesToDepartures(depTime: str, delay: int) int

Calculates approximate minutes to a departure. :param depTime: ISO datetime string of the planned departure :param delay: the delay of a departure :return: amount of minutes to departure

static setDebug(to: bool = True) None

Sets debug flag to specified state. :param to: state to set Debug to. By default, sets it to True. :return: None

static setUserAgent(newUserAgent: str) None

Sets the User Agent used when fetching the request. :param newUserAgent: New user agent to use :return: None