class TripSpark::Client::Patterns
Public Instance Methods
get(key)
click to toggle source
Return the route whose key matches the given key
# File lib/tripspark_api/client/patterns.rb, line 19 def get key list.find{ |pattern| pattern.key == key } end
Also aliased as: find
list(route_key)
click to toggle source
Return a list of all patterns belonging to the given route. Currently, there is no direct way to retrieve all patterns for all routes.
# File lib/tripspark_api/client/patterns.rb, line 7 def list route_key params = { body: { routeKey: route_key } } post_request('/RouteMap/GetPatternPoints/', params).map{ |pattern| Pattern.new(pattern) } end
Also aliased as: all