Class: Fastlane::Particle

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/pixie/helper/particle.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_token, device_id) ⇒ Particle

Returns a new instance of Particle.



7
8
9
10
# File 'lib/fastlane/plugin/pixie/helper/particle.rb', line 7

def initialize(access_token, device_id)
  @access_token = access_token
  @device_id = device_id
end

Instance Method Details

#function(name, value) ⇒ Object



12
13
14
# File 'lib/fastlane/plugin/pixie/helper/particle.rb', line 12

def function(name, value)
  post("https://api.particle.io/v1/devices/#{@device_id}/#{name}", { arg: value, access_token: @access_token })
end