lib/backlog_kit/client/project.rb in backlog_kit-0.13.0 vs lib/backlog_kit/client/project.rb in backlog_kit-0.14.0

- old
+ new

@@ -1,11 +1,9 @@ module BacklogKit class Client - # Methods for the Project API module Project - # Get list of projects # # @param params [Hash] Request parameters # @return [BacklogKit::Response] List of projects def get_projects(params = {}) @@ -25,11 +23,12 @@ # @param key [String] Project key # @param name [String] Project name # @param params [Hash] Request parameters # @return [BacklogKit::Response] The project information def create_project(key, name, params = {}) - params.merge!(key: key, name: name) + params[:key] = key + params[:name] = name post('projects', params) end # Update a project # @@ -204,11 +203,11 @@ # @param project_id_or_key [Integer, String] Project id or project key # @param name [String] Version name # @param params [Hash] Request parameters # @return [BacklogKit::Response] The version information def add_version(project_id_or_key, name, params = {}) - params.merge!(name: name) + params[:name] = name post("projects/#{project_id_or_key}/versions", params) end # Update a version # @@ -279,10 +278,11 @@ # @param name [String] Webhook name # @param hook_url [String] Webhook URL # @param params [Hash] Request parameters # @return [BacklogKit::Response] The webhook information def add_webhook(project_id_or_key, name, hook_url, params = {}) - params.merge!(name: name, hook_url: hook_url) + params[:name] = name + params[:hook_url] = hook_url post("projects/#{project_id_or_key}/webhooks", params) end # Update a webhook #