Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoint URL query string parameters #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mustdobetter
Copy link

Adding support for specification of API endpoint URL query string parameters when editing an issue. Useful when, for example, you wish to prevent users from being notified of the update i.e. ?notifyUsers=false.

…ameters when editing an issue. Useful when, for example, you wish to prevent users from being notified of the update i.e. ?notifyUsers=false
Copy link
Collaborator

@aik099 aik099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also beware of using mixed indentation (as you're doing now). This library uses TABs for indentation.

* @param $params Array of URL parameters: [key => value]
* @return string
*/
protected function formulateQueryString($params)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is PHP built-in function, that does it: http://php.net/manual/en/function.http-build-query.php

public function api(
$method = self::REQUEST_GET,
$url,
$data = array(),
$return_as_array = false,
$is_file = false,
$debug = false
$debug = false,
$url_params = array()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method already has too many params, so adding another one makes it a nightmare. Any other implementations you can suggest?

My options are:

  1. having special key in $data array that won't match any parameter of existing in JIRA API (not necessary implemented in this library) for passing query parameters
  2. use http_build_query directly on editIssue method and not add any parameters here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants