Module: VtApi
- Defined in:
- lib/vt_api/api/config.rb,
lib/vt_api.rb,
lib/vt_api/api/v2.rb,
lib/vt_api/errors.rb,
lib/vt_api/version.rb,
lib/vt_api/api/v2/url.rb,
lib/vt_api/api/v2/file.rb,
lib/vt_api/api/v2/comments.rb,
lib/vt_api/api/v2/essentials.rb,
lib/vt_api/internal/endpoint.rb,
lib/vt_api/internal/api_version.rb,
lib/vt_api/internal/api_provider.rb,
lib/vt_api/internal/versions/api_v2.rb,
lib/vt_api/internal/versions/default.rb
Overview
Defined Under Namespace
Modules: ApiV2, Versions Classes: ApiError, ApiProvider, ApiVersion, Endpoint, MissingParametersError, UndefinedMethodError
Constant Summary collapse
- VERSION =
'0.1.3'
- DEFAULT_OPTIONS =
Default options for VT API, common for all versions
OpenStruct.new( token: nil, adapter: :net_http )
Class Method Summary collapse
-
.configure {|opts| ... } ⇒ Object
Configure VtApi.
-
.options ⇒ OpenStruct
Get current options.
-
.token=(token) ⇒ String
Set VtApi token (apikey).
Class Method Details
.configure {|opts| ... } ⇒ Object
Configure VtApi.
25 26 27 |
# File 'lib/vt_api/api/config.rb', line 25 def self.configure yield end |
.options ⇒ OpenStruct
Get current options
16 17 18 |
# File 'lib/vt_api/api/config.rb', line 16 def self. @options ||= DEFAULT_OPTIONS end |
.token=(token) ⇒ String
Set VtApi token (apikey).
33 34 35 |
# File 'lib/vt_api/api/config.rb', line 33 def self.token=(token) [:token] = token end |