controlshift / action-network-rest

Ruby client for interacting with the ActionNetwork REST API
MIT License
8 stars 4 forks source link

Add support for accessing the API entrance point and checking authentication #2

Closed lavaturtle closed 4 years ago

lavaturtle commented 4 years ago

This adds a method for accessing the top-level API entrance point at https://actionnetwork.org/api/v2:

> client.entry_point.get

Accessing this endpoint can tell us whether the API key we're using is valid, because the response will include information about tags when the caller is authenticated. So this PR also adds a helper method to perform this check:

> client.entry_point.check_authentication

{"authenticated_response" => true }