Sha256: 7a0f82c3dfd43a6277850e5c3e53629c48af4621af53989a537a5ea32e8ca29c
Contents?: true
Size: 571 Bytes
Versions: 1
Compression:
Stored size: 571 Bytes
Contents
# frozen_string_literal: true module Mihari module Clients class Onyphe < Base attr_reader :api_key def initialize(base_url = "https://www.onyphe.io", api_key:, headers: {}) raise(ArgumentError, "'api_key' argument is required") if api_key.nil? super(base_url, headers: headers) @api_key = api_key end def datascan(query, page: 1) params = { page: page, apikey: api_key } res = get("/api/v2/simple/datascan/#{query}", params: params) JSON.parse(res.body.to_s) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mihari-5.1.1 | lib/mihari/clients/onyphe.rb |