Class: ActionNetworkRest::EntryPoint
- Inherits:
-
Vertebrae::Model
- Object
- Vertebrae::Model
- ActionNetworkRest::EntryPoint
- Defined in:
- lib/action_network_rest/entry_point.rb
Instance Method Summary collapse
Instance Method Details
#authenticated_successfully? ⇒ Boolean
12 13 14 15 16 17 18 19 |
# File 'lib/action_network_rest/entry_point.rb', line 12 def authenticated_successfully? response_body = get # If we successfully authenticated, the entrypoint response will include a reference to tags. # If not (API key missing or wrong), the response will not include anything about tags, # but will otherwise be successful. response_body.dig('_links', 'osdi:tags').present? end |
#base_path ⇒ Object
3 4 5 |
# File 'lib/action_network_rest/entry_point.rb', line 3 def base_path '' end |
#get ⇒ Object
7 8 9 10 |
# File 'lib/action_network_rest/entry_point.rb', line 7 def get response = client.get_request base_path response.body end |