Sha256: 6e2580671e5e256fcff5c418dc9297d075d2adb662850a3204afb8145e54a555
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
require 'learn_web/client/user' require 'learn_web/client/pull_request' require 'learn_web/client/lesson' require 'learn_web/client/validate_repo' require 'learn_web/client/fork' require 'learn_web/client/environment' module LearnWeb class Client attr_reader :token, :conn, :silent_output LEARN_URL = 'https://learn.co' API_ROOT = '/api/v1' include LearnWeb::Client::PullRequest include LearnWeb::Client::Lesson include LearnWeb::Client::ValidateRepo include LearnWeb::Client::Fork include LearnWeb::Client::User include LearnWeb::Client::Environment 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 def valid_token? !!me.data end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
learn-web-1.0.5 | lib/learn_web/client.rb |