class BrickFTP::RESTfulAPI::CreatePublicKey
Create a public key
@see developers.files.com/#create-a-public-key Create a public key
### Params
PARAMETER | TYPE | DESCRIPTION ———- | ——- | ———– title | string | Title to identify the public key. For your reference. Maximum of 50 characters. public_key | string | The public key itself. This property is write-only. It cannot be retrieved via the API.
Constants
- Params
Public Instance Methods
call(id, params)
click to toggle source
Creates a new public key for a user on the current site.
@param [Integer] id Globally unique identifier of each user.
Each user is given an ID automatically upon creation.
@param [BrickFTP::RESTfulAPI::CreatePublicKey::Params] params parameters for creating an Public key @return [BrickFTP::Types::UserPublicKey] User's Public key
# File lib/brick_ftp/restful_api/create_public_key.rb, line 35 def call(id, params) res = client.post("/api/rest/v1/users/#{id}/public_keys.json", params.to_h.compact) BrickFTP::Types::UserPublicKey.new(**res.symbolize_keys) end