Class: NationalRailWrapper::Feeds::HistoricalServicePerformance::Requests::Base
Instance Method Summary
collapse
#call
Instance Method Details
#base_url ⇒ Object
17
18
19
|
# File 'lib/national_rail_wrapper/feeds/historical_service_performance/requests/base.rb', line 17
def base_url
'https://hsp-prod.rockshore.net/api/v1'
end
|
#request_params(method, body, query, auth_token) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/national_rail_wrapper/feeds/historical_service_performance/requests/base.rb', line 4
def request_params(method, body, query, auth_token)
{
method: method,
body: body.empty? ? '' : body.to_json,
params: query,
headers: {
'Content-Type' => 'application/json',
"Authorization" => "Basic #{auth_token}"
},
ssl_verifypeer: false
}
end
|