View Source MBTA.Api.LiveFacility (mbta_sdk v0.1.0)

API calls for all endpoints tagged LiveFacility.

Summary

Functions

Live Facility Data Live data about a given facility.

List live parking data for specific parking facility Live data about a given facility.

Functions

Link to this function

api_web_live_facility_controller_index(connection, opts \\ [])

View Source
@spec api_web_live_facility_controller_index(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MBTA.Model.Forbidden.t()}
  | {:ok, MBTA.Model.TooManyRequests.t()}
  | {:ok, MBTA.Model.LiveFacility.t()}
  | {:ok, MBTA.Model.BadRequest.t()}
  | {:error, Tesla.Env.t()}

Live Facility Data Live data about a given facility.

Parameters

  • connection (MBTA.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"page[offset]" (integer()): Offset (0-based) of first element in the page
    • :"page[limit]" (integer()): Max number of elements to return
    • :sort (String.t): Results can be sorted by the id or any /data/{index}/attributes key. Assumes ascending; may be prefixed with '-' for descending | JSON pointer | Direction | sort | |--------------|-----------|------------| | /data/{index}/attributes/properties | ascending | properties | | /data/{index}/attributes/properties | descending | -properties | | /data/{index}/attributes/updated_at | ascending | updated_at | | /data/{index}/attributes/updated_at | descending | -updated_at |

    • :include (String.t): Relationships to include. facility The value of the include parameter *MUST be a comma-separated (U+002C COMMA, ",") list of relationship paths. A relationship path is a dot-separated (U+002E FULL-STOP, ".") list of relationship names. JSONAPI "include" behavior
    • :"filter[id]" (String.t): Filter by multiple parking facility ids. MUST be a comma-separated (U+002C COMMA, ",") list.

Returns

  • {:ok, MBTA.Model.LiveFacility.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

api_web_live_facility_controller_show(connection, id, opts \\ [])

View Source
@spec api_web_live_facility_controller_show(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MBTA.Model.NotAcceptable.t()}
  | {:ok, MBTA.Model.Forbidden.t()}
  | {:ok, MBTA.Model.TooManyRequests.t()}
  | {:ok, MBTA.Model.NotFound.t()}
  | {:ok, MBTA.Model.LiveFacility.t()}
  | {:error, Tesla.Env.t()}

List live parking data for specific parking facility Live data about a given facility.

Parameters

  • connection (MBTA.Connection): Connection to server
  • id (String.t): Unique identifier for facility
  • opts (keyword): Optional parameters
    • :include (String.t): Relationships to include. facility The value of the include parameter *MUST be a comma-separated (U+002C COMMA, ",") list of relationship paths. A relationship path is a dot-separated (U+002E FULL-STOP, ".") list of relationship names. JSONAPI "include" behavior

Returns

  • {:ok, MBTA.Model.LiveFacility.t} on success
  • {:error, Tesla.Env.t} on failure