Class: MustardClient::ResultsClient

Inherits:
Client
  • Object
show all
Defined in:
lib/MustardClient/results.rb

Instance Method Summary collapse

Methods inherited from Client

#execute, #initialize

Constructor Details

This class inherits a constructor from MustardClient::Client

Instance Method Details

#add(result_params) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/MustardClient/results.rb', line 29

def add result_params

  command = {}
  command[:method] = :post
  command[:route] = @mustard_url + "/results"
  command[:params] = {result: result_params}
  command[:headers] = {'User-Token' => @user_token}

  execute(command)

end

#find(result_id) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/MustardClient/results.rb', line 17

def find result_id

  command = {}
  command[:method] = :get
  command[:route] = @mustard_url + "/results/#{result_id}"
  command[:headers] = {'User-Token' => @user_token}

  execute(command)

end

#recentObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/MustardClient/results.rb', line 5

def recent

  command = {}
  command[:method] = :get
  command[:route] = @mustard_url + "/recent-results"
  command[:headers] = {'User-Token' => @user_token}

  execute(command)

end

#screenshot(result_id, screenshot_id) ⇒ Object



41
42
43
44
45
46
47
48
49
50
# File 'lib/MustardClient/results.rb', line 41

def screenshot result_id, screenshot_id

  command = {}
  command[:method] = :get
  command[:route] = @mustard_url + "/results/#{result_id}/screenshot/#{screenshot_id}"
  command[:headers] = {'User-Token' => @user_token}

  execute(command)

end