Method: Particle::Client::Devices#update_device_public_key

Defined in:
lib/particle/client/devices.rb

#update_device_public_key(target, public_key, algorithm = 'rsa') ⇒ boolean

Update the public key for a device you own



130
131
132
133
134
135
136
# File 'lib/particle/client/devices.rb', line 130

def update_device_public_key(target, public_key, algorithm = 'rsa')
  result = post(Device.provision_path,
                deviceID: device(target).id,
                publicKey: public_key,
                algorithm: algorithm)
  !result.empty?
end