Sha256: c108a74177909bfeacdf91bea95dbb8a48d798b1a83f0494a183f350e1340046

Contents?: true

Size: 526 Bytes

Versions: 6

Compression:

Stored size: 526 Bytes

Contents

require 'learn_web/client/validate_repo/slug'

module LearnWeb
  class Client
    module ValidateRepo
      def validate_repo_slug_endpoint
        "#{API_ROOT}/repo_slug_validations"
      end

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

        LearnWeb::Client::ValidateRepo::Slug.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/validate_repo.rb
learn-web-1.0.4 lib/learn_web/client/validate_repo.rb
learn-web-1.0.3 lib/learn_web/client/validate_repo.rb
learn-web-1.0.2 lib/learn_web/client/validate_repo.rb
learn-web-1.0.1 lib/learn_web/client/validate_repo.rb
learn-web-1.0.0 lib/learn_web/client/validate_repo.rb