View Source MBTA.Api.Line (mbta_sdk v0.1.0)
API calls for all endpoints tagged Line.
Summary
Functions
List of lines. A line is a combination of routes. This concept can be used to group similar routes when displaying them to customers, such as for routes which serve the same trunk corridor or bus terminal.
Single line, which represents a combination of routes.
Functions
@spec api_web_line_controller_index( Tesla.Env.client(), keyword() ) :: {:ok, MBTA.Model.Forbidden.t()} | {:ok, MBTA.Model.TooManyRequests.t()} | {:ok, MBTA.Model.Lines.t()} | {:ok, MBTA.Model.BadRequest.t()} | {:error, Tesla.Env.t()}
List of lines. A line is a combination of routes. This concept can be used to group similar routes when displaying them to customers, such as for routes which serve the same trunk corridor or bus terminal.
Parameters
connection(MBTA.Connection): Connection to serveropts(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}/attributeskey. Assumes ascending; may be prefixed with '-' for descending | JSON pointer | Direction |sort| |--------------|-----------|------------| |/data/{index}/attributes/color| ascending |color| |/data/{index}/attributes/color| descending |-color| |/data/{index}/attributes/long_name| ascending |long_name| |/data/{index}/attributes/long_name| descending |-long_name| |/data/{index}/attributes/short_name| ascending |short_name| |/data/{index}/attributes/short_name| descending |-short_name| |/data/{index}/attributes/sort_order| ascending |sort_order| |/data/{index}/attributes/sort_order| descending |-sort_order| |/data/{index}/attributes/text_color| ascending |text_color| |/data/{index}/attributes/text_color| descending |-text_color|:"fields[line]"(String.t): Fields to include with the response. Multiple fields MUST be a comma-separated (U+002C COMMA, ",") list. Note that fields can also be selected for included data types: see the V3 API Best Practices for an example.:include(String.t): Relationships to include.routesThe 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 IDs. MUST be a comma-separated (U+002C COMMA, ",") list.
Returns
{:ok, MBTA.Model.Lines.t}on success{:error, Tesla.Env.t}on failure
@spec api_web_line_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.Lines.t()} | {:ok, MBTA.Model.NotFound.t()} | {:ok, MBTA.Model.BadRequest.t()} | {:error, Tesla.Env.t()}
Single line, which represents a combination of routes.
Parameters
connection(MBTA.Connection): Connection to serverid(String.t): Unique identifier for a lineopts(keyword): Optional parameters:"fields[line]"(String.t): Fields to include with the response. Multiple fields MUST be a comma-separated (U+002C COMMA, ",") list. Note that fields can also be selected for included data types: see the V3 API Best Practices for an example.:include(String.t): Relationships to include.routesThe 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.Lines.t}on success{:error, Tesla.Env.t}on failure