Class: Pippipp

Inherits:
Object
  • Object
show all
Defined in:
lib/pippipp.rb,
lib/pippipp/test.rb

Constant Summary collapse

VERSION =
"pippipp-1.1.0"

Instance Method Summary collapse

Constructor Details

#initialize(key, url = "https://pippipp.com/status") ⇒ Pippipp

Returns a new instance of Pippipp.



6
7
8
9
# File 'lib/pippipp.rb', line 6

def initialize(key, url = "https://pippipp.com/status")
  @key = key
  @url = url
end

Instance Method Details

#status(message) ⇒ Object



11
12
13
14
15
# File 'lib/pippipp.rb', line 11

def status(message)
  return Requests.request("POST", @url,
    auth: [VERSION, @key],
    data: { message: message })
end