class Luxafor::Client

Constants

BASE

Attributes

webhook_id[R]

Public Class Methods

new(webhook_id) click to toggle source
# File lib/client.rb, line 9
def initialize(webhook_id)
  @webhook_id = webhook_id
end

Public Instance Methods

off() click to toggle source
# File lib/client.rb, line 23
def off
  on("000000")
end
on(color = "FF00FF") click to toggle source
# File lib/client.rb, line 13
def on(color = "FF00FF")
  HTTP.post(BASE + "/solid_color", json: {
    "userId": webhook_id,
    "actionFields": {
      "color": "custom",
      "custom_color": color
    }
  })
end