Module: Twelve::API::Gauges::Shares

Included in:
Proxy
Defined in:
lib/twelve/api/gauges/shares.rb

Overview

The Shares module handles sharing gauges

Instance Method Summary collapse

Instance Method Details

#share(email) ⇒ Object

Shares a gauge with a person by their email

email - String of email address

Returns json



29
30
31
# File 'lib/twelve/api/gauges/shares.rb', line 29

def share(email)
  connection.post("#{path_prefix}/shares", email).body['share']
end

#sharesObject

Get a list of users gauge is shared with

Returns json



19
20
21
# File 'lib/twelve/api/gauges/shares.rb', line 19

def shares
  connection.get("#{path_prefix}/shares").body['shares']
end

#unshare(id) ⇒ Object

Un-shares a gauge with a person by their email

id - String of user id

Returns json



39
40
41
# File 'lib/twelve/api/gauges/shares.rb', line 39

def unshare(id)
  connection.delete("#{path_prefix}/shares/#{id}").body['share']
end