Class: Nozbe::ActionCheckApiCall

Inherits:
ApiCall
  • Object
show all
Defined in:
lib/nozbe/action.rb

Overview

This class is used internaly by the Action class to make the API call that mark some actions as ‘done’

Constant Summary

Constants inherited from ApiCall

Nozbe::ApiCall::API_BASE_URL

Instance Attribute Summary

Attributes inherited from ApiCall

#action, #parameters, #required_parameters

Instance Method Summary collapse

Methods inherited from ApiCall

action, #build_query_string, #build_request_path, #call, #do_request, #url_encode

Constructor Details

#initialize(user_key, actions_ids = []) ⇒ ActionCheckApiCall

Returns a new instance of ActionCheckApiCall.



97
98
99
# File 'lib/nozbe/action.rb', line 97

def initialize(user_key, actions_ids = [])
  super(user_key, {:ids => actions_ids})
end

Instance Method Details

#parse(json) ⇒ Object

Parse the JSON response, and return true or false



101
102
103
104
# File 'lib/nozbe/action.rb', line 101

def parse(json)
  res = super(json)
  res["response"] == "ok"
end