Class: SendGrid4r::CLI::ApiKeys::ApiKey
- Inherits:
-
SgThor
- Object
- Thor
- SgThor
- SendGrid4r::CLI::ApiKeys::ApiKey
show all
- Defined in:
- lib/sendgrid4r/cli/api_keys/api_key.rb
Overview
SendGrid Web API v3 ApiKeys ApiKey
Instance Method Summary
collapse
Methods inherited from SgThor
#initialize
Instance Method Details
#create ⇒ Object
17
18
19
20
21
|
# File 'lib/sendgrid4r/cli/api_keys/api_key.rb', line 17
def create
puts @client.post_api_key(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#delete ⇒ Object
33
34
35
36
37
|
# File 'lib/sendgrid4r/cli/api_keys/api_key.rb', line 33
def delete
puts @client.delete_api_key(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#get ⇒ Object
25
26
27
28
29
|
# File 'lib/sendgrid4r/cli/api_keys/api_key.rb', line 25
def get
puts @client.get_api_key(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#list ⇒ Object
8
9
10
11
12
|
# File 'lib/sendgrid4r/cli/api_keys/api_key.rb', line 8
def list
puts @client.get_api_keys
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#update ⇒ Object
43
44
45
46
47
|
# File 'lib/sendgrid4r/cli/api_keys/api_key.rb', line 43
def update
puts @client.put_api_key(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|