Module: Seer

Defined in:
lib/seer.rb,
lib/seer/dns.rb,
lib/seer/org.rb,
lib/seer/hosts.rb,
lib/seer/status.rb,
lib/seer/version.rb

Overview

SEER API Wrapper

Author:

Version:

  • 0.1

Defined Under Namespace

Classes: DNS, Hosts, Org, Status, Version

Class Method Summary collapse

Class Method Details

.request(url, body, header) ⇒ Hash

Send request to SEER API

Parameters:

  • url (String)

    Request url

  • body (String)

    Request body

  • header (Hash)

    Request hash

Returns:

  • (Hash)


12
13
14
15
16
17
18
19
# File 'lib/seer.rb', line 12

def request(url, body, header)
  response = RestClient.post(
    url,
    JSON.dump(body),
    header
  )
  JSON.load response
end