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

Already on GitHub? Sign in to your account

allow for ghsearch({user: 'username'}) #87

Closed
gr2m opened this Issue Jan 22, 2014 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

gr2m commented Jan 22, 2014

use case:
I'd like get all all issues from an organization. This for example works:
https://api.github.com/search/issues?q=user:hoodiehq

but the current ghsearch.issues API does not allow to pass an config object like other methods do.

That's what I try exactly:

search.issues({
  author: 'hoodiehq',
  state: 'closed',
  since: since,
  per_page: 100
}, callback)

that fails with

TypeError: undefined is not a function
    at app/node_modules/octonode/lib/octonode/search.js:16:18

@pksunkara pksunkara closed this in 5247e53 Jan 24, 2014

Owner

pksunkara commented Jan 24, 2014

The search api used to follow legacy. But now I updated it to v3.

Contributor

gr2m commented Jan 24, 2014

There's unfortunately a tricky problem. When I do

search.issues({
    q: 'user:hoodiehq&state:closed',
    per_page: 100
  }, function(error, results) {

the resulting URL will be

https://api.github.com/search/issues?q=user%3Ahoodiehq%26state%3Aclosed

But should be

https://api.github.com/search/issues?q=user:hoodiehq&state:closed
                                                    ^

Any idea how that could be fixed? Problem lies at https://github.com/pksunkara/octonode/blob/master/src/octonode/client.coffee#L88. No idea how to work around it ...

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