Sha256: 8ba59290645c9ff8d0ccf3b57fca92949847695f160b957ef9222338585c54d1
Contents?: true
Size: 792 Bytes
Versions: 10
Compression:
Stored size: 792 Bytes
Contents
module Barong # General barong API functions class API 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
10 entries across 10 versions & 1 rubygems