demarches-normaliennes/app/lib/api_tchap/hs_adapter.rb

18 lines
271 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2023-03-31 17:19:02 +02:00
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