deutschebahn.py
  • Getting Started
  • Functions
    • opt / Betriebstellen
    • StaDa
  • Objects
    • oPoint
    • Station
Powered by GitBook
On this page
  • Functions
  • get_oPoints_by_name
  • get_oPoint_by_ril100

Was this helpful?

  1. Functions

opt / Betriebstellen

The following will document the functions, objects and methods associated with oPoint / Betriebsstellen API.

Note that oPoint is simply a adaptation for the Betriebsstellen name the is instead used by the Deutsche Bahn API.

Functions

get_oPoints_by_name

get_oPoints_by_name(search_string: str, return_http_code=False) -> list or int

This function will return a list of oPoint objects matching a given string.

Parameters

  • search_string: String to search

  • return_http_code [Optional]: False by default. Enabling this will return the HTTP status code if it's not 200, rather than returning an empty list.

a list of oPoint objects

If return_http_code is False, it will return an empty list. [default]

If return_http_code is True, it will return an HTTP status code if it's not 200.

get_oPoint_by_ril100

def get_oPoint_by_ril100(ril100: str, return_http_code=False) -> list or int

This function will search for an operating station by ril100 code

Parameters

  • ril100: ril100 code

  • return_http_code [Optional]: False by default. Enabling this will return the HTTP status code if it's not 200, rather than returning an empty list.

an oPoint object

If return_http_code is False, it will return an empty list. [default]

If return_http_code is True, it will return an HTTP status code if it's not 200.

PreviousGetting StartedNextStaDa

Last updated 4 years ago

Was this helpful?