Module: BrightData::LinkedIn::Endpoint::ClassMethods Private
- Defined in:
- lib/brightdata/linkedin/endpoint.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Declarative endpoint builder mixed into classes that include BrightData::LinkedIn::Endpoint.
Instance Method Summary collapse
-
#endpoint(dataset_key:, result:, param:, input: nil, input_type: nil, extra_query: {}) ⇒ void
private
Declare an endpoint mode.
Instance Method Details
#endpoint(dataset_key:, result:, param:, input: nil, input_type: nil, extra_query: {}) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Declare an endpoint mode.
Generates ‘#initialize(http:)`, `#trigger`/`#scrape` (with a real keyword argument named after `param`), input validation, and result parsing. Pass either `input` (each value is a URL string wrapped in that input class) or `input_type` (each value must already be an instance of that type).
42 43 44 45 46 47 48 49 |
# File 'lib/brightdata/linkedin/endpoint.rb', line 42 def endpoint(dataset_key:, result:, param:, input: nil, input_type: nil, extra_query: {}) # rubocop:disable Metrics/ParameterLists -- each keyword names one facet of the endpoint DSL const_set(:DATASET_KEY, dataset_key) const_set(:EXTRA_QUERY, extra_query.freeze) define_initialize define_result_parser(result) input ? define_url_inputs(param, input) : define_object_inputs(param, input_type) define_actions(param) end |