Sha256: 2c1546150aac0c9a06d5a706e1252fd9ef4bdf0b52d79f8e23a2750d002f5831
Contents?: true
Size: 833 Bytes
Versions: 5
Compression:
Stored size: 833 Bytes
Contents
# frozen_string_literal: true module ApiController # General barong API functions class Barong require 'json' require 'rest-client' def initialize(endpoint, app_id) @endpoint = endpoint @app_id = app_id end def log_in(email, password) response = RestClient.post("#{@endpoint}/sessions", { 'email': email, 'password': password, 'application_id': @app_id, 'expires_in': 60_000_000 }, { 'content_type': 'application/x-www-form-urlencoded' }) response.delete('"') end end end
Version data entries
5 entries across 5 versions & 1 rubygems