module LearnWeb::Client::SshKeys
Public Instance Methods
add_ssh_key(key:, key_title: nil, client: nil)
click to toggle source
# File lib/learn_web/client/ssh_keys.rb, line 10 def add_ssh_key(key:, key_title: nil, client: nil) response = post( add_ssh_key_endpoint, headers: { 'Authorization' => "Bearer #{token}" }, params: { 'key' => key, key_title: key_title }.reject { |_, v| v.nil? }, client: client ) LearnWeb::Client::SshKeys::Add.new(response).parse! end
add_ssh_key_endpoint()
click to toggle source
# File lib/learn_web/client/ssh_keys.rb, line 6 def add_ssh_key_endpoint "#{API_ROOT}/ssh_keys" end