Module: Spearly::Auth::Team

Included in:
Client
Defined in:
lib/spearly/auth/team.rb

Instance Method Summary collapse

Instance Method Details

#create_team(params) ⇒ Object

POST /teams



7
8
9
10
11
12
13
14
15
# File 'lib/spearly/auth/team.rb', line 7

def create_team(params)
  response = run_request(
    :method => :post,
    path: '/teams',
    params: params
  )

  process_response(response)
end

#get_team(team_id) ⇒ Object

GET /teams/:team_id



18
19
20
21
22
23
24
25
# File 'lib/spearly/auth/team.rb', line 18

def get_team(team_id)
  response = run_request(
    :method => :get,
    path: "/teams/#{team_id}"
  )

  process_response(response)
end

#get_teams(params) ⇒ Object

GET /teams



28
29
30
31
32
33
34
35
36
# File 'lib/spearly/auth/team.rb', line 28

def get_teams(params)
  response = run_request(
    :method => :get,
    path: '/teams',
    params: params
  )

  process_response(response)
end

#regenerate_team_api_access_token(team_id) ⇒ Object

POST /teams/:team_id/regenerate_api_access_token



50
51
52
53
54
55
56
57
# File 'lib/spearly/auth/team.rb', line 50

def regenerate_team_api_access_token(team_id)
  response = run_request(
    :method => :post,
    path: "/teams/#{team_id}/regenerate_api_access_token"
  )

  process_response(response)
end

#update_team(team_id, params) ⇒ Object

PUT /teams/:team_id



39
40
41
42
43
44
45
46
47
# File 'lib/spearly/auth/team.rb', line 39

def update_team(team_id, params)
  response = run_request(
    :method => :put,
    path: "/teams/#{team_id}",
    params: params
  )

  process_response(response)
end