Class: NearApi::Query
- Inherits:
-
Object
- Object
- NearApi::Query
- Defined in:
- lib/near_api/query.rb
Instance Method Summary collapse
- #call(account_id, method_name, args, finality: 'optimistic') ⇒ Object
-
#initialize(config = NearApi.config) ⇒ Query
constructor
A new instance of Query.
Constructor Details
Instance Method Details
#call(account_id, method_name, args, finality: 'optimistic') ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/near_api/query.rb', line 8 def call(account_id, method_name, args, finality: 'optimistic') params = { account_id: account_id, method_name: method_name, finality: finality, request_type: 'call_function', args_base64: Base64.strict_encode64(args.to_json) } call_api(params) end |