Class: NationalRailWrapper::Feeds::KnowledgeBase::Client
- Inherits:
-
Client
- Object
- Client
- NationalRailWrapper::Feeds::KnowledgeBase::Client
show all
- Defined in:
- lib/national_rail_wrapper/feeds/knowledge_base/client.rb
Instance Method Summary
collapse
Methods inherited from Client
#initialize
Instance Method Details
#incidents(parse_result: true) ⇒ Object
6
7
8
9
10
|
# File 'lib/national_rail_wrapper/feeds/knowledge_base/client.rb', line 6
def incidents(parse_result: true)
request = KnowledgeBase::Requests::Incidents.new.run(auth_token)
parse_result ? Ox.parse(request.response_body).to_json : request.response_body
end
|
#national_service_indicators(parse_result: true) ⇒ Object
22
23
24
25
26
|
# File 'lib/national_rail_wrapper/feeds/knowledge_base/client.rb', line 22
def public_promotions(parse_result: true)
request = KnowledgeBase::Requests::PublicPromotions.new.run(auth_token)
parse_result ? response.to_json : request.response_body
end
|
#stations(parse_result: true) ⇒ Object
#ticket_restrictions(parse_result: true) ⇒ Object
38
39
40
41
42
|
# File 'lib/national_rail_wrapper/feeds/knowledge_base/client.rb', line 38
def ticket_restrictions(parse_result: true)
request = KnowledgeBase::Requests::TicketRestrictions.new.run(auth_token)
parse_result ? Ox.parse(request.response_body).to_json : request.response_body
end
|
#ticket_types(parse_result: true) ⇒ Object
44
45
46
47
48
|
# File 'lib/national_rail_wrapper/feeds/knowledge_base/client.rb', line 44
def ticket_types(parse_result: true)
request = KnowledgeBase::Requests::TicketTypes.new.run(auth_token)
parse_result ? Ox.parse(request.response_body).to_json : request.response_body
end
|
#tocs(parse_result: true) ⇒ Object