lib/megar/connection.rb
def api_request(data)
    params = {'id' => next_sequence_number!}
    params['sid'] = sid if sid
    json_data = [data].to_json

    response_body = get_api_response(params,json_data)
    parse_json_response(response_body)
  end
# Command: Perform a single API request given +data+
Perform a single API request given +data+
Perform a single API request given + data +
def api_request(data)
    params = {'id' => next_sequence_number!}
    params['sid'] = sid if sid
    json_data = [data].to_json
    response_body = get_api_response(params,json_data)
    parse_json_response(response_body)
  end
def api_request ( data ) params = { 'id' => next_sequence_number! } params [ 'sid' ] = sid if sid json_data = [ data ] . to_json response_body = get_api_response ( params , json_data ) parse_json_response ( response_body ) end
Command: Perform a single API request given +data+
Command : Perform a single API request given + data +
data