Module: Onena::Protocol
- Defined in:
- lib/onena/protocol.rb
Constant Summary collapse
- TOCK_API_BASE_URL =
'https://tock.18f.gov/api/'
- FLOAT_API_BASE_URL =
'https://api.floatschedule.com/api'
- FLOAT_API_VERSION =
'v1'
Class Method Summary collapse
- .float_projects_url ⇒ Object
- .float_users_url ⇒ Object
- .tock_projects_url(endpoint: nil) ⇒ Object
- .tock_users_url(endpoint: nil) ⇒ Object
Class Method Details
.float_projects_url ⇒ Object
21 22 23 |
# File 'lib/onena/protocol.rb', line 21 def self.float_projects_url "#{FLOAT_API_BASE_URL}/#{FLOAT_API_VERSION}/projects" end |
.float_users_url ⇒ Object
17 18 19 |
# File 'lib/onena/protocol.rb', line 17 def self.float_users_url "#{FLOAT_API_BASE_URL}/#{FLOAT_API_VERSION}/people" end |
.tock_projects_url(endpoint: nil) ⇒ Object
12 13 14 15 |
# File 'lib/onena/protocol.rb', line 12 def self.tock_projects_url(endpoint: nil) fail Onena::Error::ArgumentMissing, 'Tock endpoint is missing' if endpoint.nil? "#{endpoint}/projects.json?page_size=100000" end |
.tock_users_url(endpoint: nil) ⇒ Object
7 8 9 10 |
# File 'lib/onena/protocol.rb', line 7 def self.tock_users_url(endpoint: nil) fail Onena::Error::ArgumentMissing, 'Tock endpoint is missing' if endpoint.nil? "#{endpoint}/users.json?page_size=100000" end |