Class: Backend::Api::Request

Inherits:
Object
  • Object
show all
Extended by:
ConnectionHelper
Defined in:
api/request.rb

Overview

Class that connect to endpoints related to the Requests

Class Method Summary collapse

Class Method Details

.info(request_id) ⇒ String

Returns the request info based on the id provided

Returns:

  • (String)


15
16
17
# File 'api/request.rb', line 15

def self.info(request_id)
  http_get(['/request/:id', request_id])
end

.last_idInteger

Returns the request id of the last one

Returns:

  • (Integer)


21
22
23
# File 'api/request.rb', line 21

def self.last_id
  http_get('/request/_lastid').to_i
end

.listString

Get a list of requests

Returns:

  • (String)


9
10
11
# File 'api/request.rb', line 9

def self.list
  http_get('/request')
end