Sha256: 41d6001537197e05301183e5a19a434f593c992ed46c0233f91861b21d92f017

Contents?: true

Size: 1.37 KB

Versions: 5

Compression:

Stored size: 1.37 KB

Contents

# encoding: utf-8

module BitBucket
  # A class responsible for dispatching http requests
  class Request

    # Defines HTTP verbs
    module Verbs
      # Make a get request
      #
      # @api public
      def get_request(path, params = ParamsHash.empty)
        request = Request.new(:get, path, self).call(current_options, params)
        request.auto_paginate
      end

      # Make a patch request
      #
      # @api public
      def patch_request(path, params = ParamsHash.empty)
        Request.new(:patch, path, self).call(current_options, params)
      end

      # Make a post request
      #
      # @api public
      def post_request(path, params = ParamsHash.empty)
        Request.new(:post, path, self).call(current_options, params)
      end

      # Make a put request
      #
      # @api public
      def put_request(path, params = ParamsHash.empty)
        Request.new(:put, path, self).call(current_options, params)
      end

      # Make a delete request
      #
      # @api public
      def delete_request(path, params = ParamsHash.empty)
        Request.new(:delete, path, self).call(current_options, params)
      end

      # Make a options request
      #
      # @api public
      def options_request(path, params = ParamsHash.empty)
        Request.new(:options, path, self).call(current_options, params)
      end
    end # Verbs
  end # Request
end # BitBucket

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
codenamev_bitbucket_api-0.4.1 lib/bitbucket_rest_api/request/verbs.rb
codenamev_bitbucket_api-0.4.0 lib/bitbucket_rest_api/request/verbs.rb
reenhanced_bitbucket_api-0.3.2 lib/bitbucket_rest_api/request/verbs.rb
reenhanced_bitbucket_api-0.3.1 lib/bitbucket_rest_api/request/verbs.rb
reenhanced_bitbucket_api-0.3.0 lib/bitbucket_rest_api/request/verbs.rb