Sha256: a8916d8a80545e89f1ba5226f448c106f190afe8ffb6e15c6476ce4e0ba39c41

Contents?: true

Size: 462 Bytes

Versions: 6

Compression:

Stored size: 462 Bytes

Contents

require 'learn_web/client/fork/request'

module LearnWeb
  class Client
    module Fork
      def fork_endpoint
        "#{API_ROOT}/fork_requests"
      end

      def fork_repo(repo_name:)
        response = @conn.post do |req|
          req.url fork_endpoint
          req.headers['Authorization'] = "Bearer #{token}"
          req.params['repo_name'] = repo_name
        end

        LearnWeb::Client::Fork::Request.new(response)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
learn-web-1.0.5 lib/learn_web/client/fork.rb
learn-web-1.0.4 lib/learn_web/client/fork.rb
learn-web-1.0.3 lib/learn_web/client/fork.rb
learn-web-1.0.2 lib/learn_web/client/fork.rb
learn-web-1.0.1 lib/learn_web/client/fork.rb
learn-web-1.0.0 lib/learn_web/client/fork.rb