Sha256: db5fb5c6211acfd8a819db17ef1f481380171defa7108b991324723322f63a85

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

module BacklogKit
  class Client

    # Methods for the Group API
    module Group

      # Get list of groups
      #
      # @param params [Hash] Request parameters
      # @return [BacklogKit::Response] List of groups
      def get_groups(params = {})
        get('groups', params)
      end

      # Get a group
      #
      # @param group_id [Integer, String] Group id
      # @return [BacklogKit::Response] The group information
      def get_group(group_id)
        get("groups/#{group_id}")
      end

      # Create a new group
      #
      # @param name [String] Group name
      # @param params [Hash] Request parameters
      # @return [BacklogKit::Response] The group information
      def create_group(name, params = {})
        params.merge!(name: name)
        post('groups', params)
      end

      # Update a group
      #
      # @param group_id [Integer, String] Group id
      # @param params [Hash] Request parameters
      # @return [BacklogKit::Response] The group information
      def update_group(group_id, params = {})
        patch("groups/#{group_id}", params)
      end

      # Delete a group
      #
      # @param group_id [Integer, String] Group id
      # @return [BacklogKit::Response] The group information
      def delete_group(group_id)
        delete("groups/#{group_id}")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backlog_kit-0.13.0 lib/backlog_kit/client/group.rb