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.



30
31
32
# File 'lib/mailinator_client/stats.rb', line 30

def initialize(client)
  @client = client
end

Instance Method Details

#get_team(params = {}) ⇒ Object

Retrieves team info

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

Responses:



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

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_statsObject

Retrieves stats of team

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

Responses:



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

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