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

Ability for query params #10

Closed
dylanfoster opened this issue Oct 25, 2014 · 3 comments
Closed

Ability for query params #10

dylanfoster opened this issue Oct 25, 2014 · 3 comments
Assignees
Labels

Comments

@dylanfoster
Copy link

Mostly used for issues, being able to use query params is important. Being able to search for open/closed, labels, milestones etc

@fengmk2
Copy link
Member

fengmk2 commented Oct 26, 2014

You can set any other query params on it. Like list closed and label equal foo issues:

client.issues.list({
  state: 'closed',
  labels: 'foo'
}, function (err, issues) {

});

All query params are support on gitlab api document: https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md#list-issues

@fengmk2 fengmk2 self-assigned this Oct 26, 2014
@dylanfoster
Copy link
Author

I've tried this:

client.issues.list({
  id: 12345,
  state: "open"
}, function(err, issues){
  console.log(issues)
});

which gives me all issues (both opened and closed

and I've tried

client.issues.list({
  state: "open" // leaving out the project id
}, function(err, issues){
  console.log(issues);
});

which gives me a 404 not found because the restful-client doesn't get the id, so the route ends up
http://gitlab.com/api/v3/projects/:id/issues

@dylanfoster
Copy link
Author

Seems to be an issue with Gitlab Enterprise

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

No branches or pull requests

2 participants