Module: Huntress
- Extended by:
- WrAPI::Configuration, WrAPI::RespondTo
- Defined in:
- lib/huntress.rb,
lib/huntress/api.rb,
lib/huntress/error.rb,
lib/huntress/client.rb,
lib/huntress/version.rb,
lib/huntress/connection.rb,
lib/huntress/pagination.rb,
lib/huntress/authentication.rb
Overview
require File.expand_path(‘asset_helper’, __dir__)
Defined Under Namespace
Modules: Authentication, Connection, RequestPagination Classes: API, AuthenticationError, Client, HuntressError
Constant Summary collapse
- DEFAULT_UA =
Default User-Agent header sent with API requests, including gem version information.
"Huntress Ruby API wrapper #{Huntress::VERSION}"- DEFAULT_ENDPOINT =
Default api endpoint
'https://api.huntress.io'- DEFAULT_PAGINATION =
RequestPagination::PaginationPager
- DEFAULT_PAGE_SIZE =
25- VERSION =
'0.1.0'
Class Method Summary collapse
- .client(options = {}) ⇒ Huntress::Client
-
.reset ⇒ Object
Resets the Skykick configuration to default values.
Class Method Details
.client(options = {}) ⇒ Huntress::Client
22 23 24 25 26 27 28 29 |
# File 'lib/huntress.rb', line 22 def self.client( = {}) Huntress::Client.new({ endpoint: DEFAULT_ENDPOINT, user_agent: DEFAULT_UA, page_size: DEFAULT_PAGE_SIZE, pagination_class: DEFAULT_PAGINATION }.merge()) end |
.reset ⇒ Object
Resets the Skykick configuration to default values.
This method resets the configuration values to their defaults:
-
‘DEFAULT_UA` for the User-Agent
38 39 40 41 42 43 44 |
# File 'lib/huntress.rb', line 38 def self.reset super self.endpoint = DEFAULT_ENDPOINT self.user_agent = DEFAULT_UA self.page_size = DEFAULT_PAGE_SIZE self.pagination_class = DEFAULT_PAGINATION end |