-
Notifications
You must be signed in to change notification settings - Fork 123
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
base: master
Are you sure you want to change the base?
Conversation
…ameters when editing an issue. Useful when, for example, you wish to prevent users from being notified of the update i.e. ?notifyUsers=false
There was a problem hiding this 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) |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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:
- 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 - use
http_build_query
directly oneditIssue
method and not add any parameters here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented in the #222.
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.