Class: MailinatorClient::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/mailinator_client/stats.rb

Overview

Class containing all the actions for the Stats Resource

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Stats

Returns a new instance of Stats.



8
9
10
# File 'lib/mailinator_client/stats.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#get_team(params = {}) ⇒ Object

Retrieves team stats

Authentication: The client must be configured with a valid api access token to call this action.

Responses:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/mailinator_client/stats.rb', line 66

def get_team(params = {})
  params = Utils.symbolize_hash_keys(params)
  query_params = { }
  headers = {}
  body = nil

  path = "/team"

  @client.request(
    method: :get,
    path: path,
    query: query_params,
    headers: headers,
    body: body)
end

#get_team_infoObject

Retrieves info of team

Authentication: The client must be configured with a valid api access token to call this action.

Responses:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/mailinator_client/stats.rb', line 20

def get_team_info()
  query_params = { }
  headers = {}
  body = nil

  path = "/teaminfo"

  @client.request(
    method: :get,
    path: path,
    query: query_params,
    headers: headers,
    body: body)
end

#get_team_statsObject

Retrieves stats of team

Authentication: The client must be configured with a valid api access token to call this action.

Responses:



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/mailinator_client/stats.rb', line 43

def get_team_stats()
  query_params = { }
  headers = {}
  body = nil

  path = "/team/stats"

  @client.request(
    method: :get,
    path: path,
    query: query_params,
    headers: headers,
    body: body)
end