Sha256: d777d1c2c7203e46c7c3f5cf531db2a7e459bd600497183c206a536221eb21c6

Contents?: true

Size: 829 Bytes

Versions: 24

Compression:

Stored size: 829 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': 80_000
                                 },
                                 {
                                     'content_type': 'application/x-www-form-urlencoded'
                                 })
      response.delete('"')
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
SimBot-0.1.43 lib/ApiController/barong.rb
SimBot-0.1.42 lib/ApiController/barong.rb
SimBot-0.1.41 lib/ApiController/barong.rb
SimBot-0.1.40 lib/ApiController/barong.rb
SimBot-0.1.39 lib/ApiController/barong.rb
SimBot-0.1.38 lib/ApiController/barong.rb
SimBot-0.1.37 lib/ApiController/barong.rb
SimBot-0.1.36 lib/ApiController/barong.rb
SimBot-0.1.35 lib/ApiController/barong.rb
SimBot-0.1.34 lib/ApiController/barong.rb
SimBot-0.1.33 lib/ApiController/barong.rb
SimBot-0.1.32 lib/ApiController/barong.rb
SimBot-0.1.31 lib/ApiController/barong.rb
SimBot-0.1.30 lib/ApiController/barong.rb
SimBot-0.1.29 lib/ApiController/barong.rb
SimBot-0.1.28 lib/ApiController/barong.rb
SimBot-0.1.27 lib/ApiController/barong.rb
SimBot-0.1.26 lib/ApiController/barong.rb
SimBot-0.1.25 lib/ApiController/barong.rb
SimBot-0.1.24 lib/ApiController/barong.rb