class LearnWeb::Client

Constants

API_ROOT
LEARN_URL

Attributes

conn[R]
silent_output[R]
token[R]

Public Class Methods

new(token:, silent_output: false) click to toggle source
# File lib/learn_web/client.rb, line 30
def initialize(token:, silent_output: false)
  @token = token
  @silent_output = silent_output
  @conn = Faraday.new(url: LEARN_URL) do |faraday|
    faraday.adapter Faraday.default_adapter
  end
end

Public Instance Methods

valid_token?() click to toggle source
# File lib/learn_web/client.rb, line 38
def valid_token?
  !!me.data
end