lib/mihari/clients/onyphe.rb in mihari-5.7.1 vs lib/mihari/clients/onyphe.rb in mihari-5.7.2
- old
+ new
@@ -38,11 +38,10 @@
#
# @return [Mihari::Structs::Onyphe::Response]
#
def datascan(query, page: 1)
params = { page: page, apikey: api_key }
- res = get("/api/v2/simple/datascan/#{query}", params: params)
- Structs::Onyphe::Response.from_dynamic! JSON.parse(res.body.to_s)
+ Structs::Onyphe::Response.from_dynamic! get_json("/api/v2/simple/datascan/#{query}", params: params)
end
#
# @param [String] query
# @param [Integer] pagination_limit