demarches-normaliennes/app/lib/api_tchap/hs_adapter.rb
Christophe Robillard 53dd2955e4 add tchap hs adapter
2023-05-16 09:40:53 +02:00

15 lines
240 B
Ruby

class APITchap::HsAdapter
def initialize(email)
@email = email
end
def to_hs
data_source[:hs]
end
private
def data_source
@data_source ||= JSON.parse(APITchap::API.get_hs(@email), symbolize_names: true)
end
end