Class: Mihari::Structs::Fofa::Response
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Mihari::Structs::Fofa::Response
- Defined in:
- lib/mihari/structs/fofa.rb
Instance Attribute Summary collapse
- #errmsg ⇒ String? readonly
- #error ⇒ Boolean readonly
- #mode ⇒ String? readonly
- #page ⇒ Integer? readonly
- #query ⇒ String? readonly
- #results ⇒ Array<String>? readonly
- #size ⇒ Integer? readonly
Class Method Summary collapse
Instance Attribute Details
#errmsg ⇒ String? (readonly)
13 |
# File 'lib/mihari/structs/fofa.rb', line 13 attribute? :errmsg, Types::String.optional |
#error ⇒ Boolean (readonly)
9 |
# File 'lib/mihari/structs/fofa.rb', line 9 attribute :error, Types::Bool |
#mode ⇒ String? (readonly)
25 |
# File 'lib/mihari/structs/fofa.rb', line 25 attribute? :mode, Types::String.optional |
#page ⇒ Integer? (readonly)
21 |
# File 'lib/mihari/structs/fofa.rb', line 21 attribute? :page, Types::Int.optional |
#query ⇒ String? (readonly)
29 |
# File 'lib/mihari/structs/fofa.rb', line 29 attribute? :query, Types::String.optional |
Class Method Details
.from_dynamic!(d) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/mihari/structs/fofa.rb', line 39 def from_dynamic!(d) new( error: d.fetch("error"), errmsg: d["errmsg"], size: d["size"], page: d["page"], mode: d["mode"], query: d["query"], results: d["results"] ) end |