Module: Tacokit::Client::Tokens

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/tokens.rb

Instance Method Summary collapse

Instance Method Details

#delete_token(token) ⇒ Object

DELETE /1/tokens/


24
25
26
# File 'lib/tacokit/client/tokens.rb', line 24

def delete_token(token)
  delete token_path(token)
end

#token(token, options = nil) ⇒ Object

GET /1/tokens/


5
6
7
# File 'lib/tacokit/client/tokens.rb', line 5

def token(token, options = nil)
  get token_path(token), options
end

#token_path(*paths) ⇒ Object


30
31
32
# File 'lib/tacokit/client/tokens.rb', line 30

def token_path(*paths)
  path_join "tokens", *paths
end

#token_resource(token, resource, *paths) ⇒ Object

GET /1/tokens//[resource] member webhooks member/ webhooks/


14
15
16
17
# File 'lib/tacokit/client/tokens.rb', line 14

def token_resource(token, resource, *paths)
  paths, options = extract_options(camp(resource), *paths)
  get token_path(token, *paths), options
end