Class: TypedForm::API::Client
- Inherits:
-
Object
- Object
- TypedForm::API::Client
- Includes:
- HTTParty
- Defined in:
- lib/typed_form/api/client.rb
Overview
API wrapper for querying typeform's Data API.
Instance Attribute Summary collapse
-
#api_key ⇒ String
Your Typeform API key.
Instance Method Summary collapse
-
#find_form_by(form_id:, token:, **query_params) ⇒ Object
Queries the Typeform Data API /form/ endpoint to retrieve a specific response (filtered by token) for a specific Form.
-
#initialize(api_key:) ⇒ Client
constructor
Creates a new instance of an API client for querying the Typeform Data API.
Constructor Details
#initialize(api_key:) ⇒ Client
Creates a new instance of an API client for querying the Typeform Data API.
15 16 17 |
# File 'lib/typed_form/api/client.rb', line 15 def initialize(api_key:) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ String
Your Typeform API key.
7 8 9 |
# File 'lib/typed_form/api/client.rb', line 7 def api_key @api_key end |
Instance Method Details
#find_form_by(form_id:, token:, **query_params) ⇒ Object
Queries the Typeform Data API /form/ endpoint to retrieve a specific response (filtered by token) for a specific Form.
parameters to the form's query. See https://www.typeform.com/help/data-api/ under Filtering Options for more information.
28 29 30 |
# File 'lib/typed_form/api/client.rb', line 28 def find_form_by(form_id:, token:, **query_params) forms_by_id(form_id: form_id, token: token, **query_params) end |