Class: APDM::Origo::API

Inherits:
Object
  • Object
show all
Defined in:
lib/apdm/origo.rb

Instance Method Summary collapse

Instance Method Details

#fetch_credentials(id) ⇒ Object

Credentials in Origo relate a person to an organization via a role. An ‘authorized’ role means that a human has actually eyeballed the credential and said: “Yeah, this is true.” A ‘privileged’ role, gives the person god-like powers in the organization, but only works if actually authorized.



34
35
36
37
# File 'lib/apdm/origo.rb', line 34

def fetch_credentials(id)
  credentials = JSON.parse(Curl::Easy.http_get("#{url}#{id}").body_str)
  credentials.select {|credential| Origo.organization?(credential["organization"]["id"]) }
end