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

How to search all repos based on a keyword? #211

Closed
KPRATIK opened this issue Jul 20, 2015 · 1 comment
Closed

How to search all repos based on a keyword? #211

KPRATIK opened this issue Jul 20, 2015 · 1 comment

Comments

@KPRATIK
Copy link

KPRATIK commented Jul 20, 2015

I am trying to do something like this:
https://api.github.com/search/repositories?q=tetris

This is the code I have now:
GitHub github = GitHub.connectToEnterprise("https://github.corp..com/api/v3", "", "");
GHRepositorySearchBuilder search = github.searchRepositories();
GHRepositorySearchBuilder s = search.q("audit");

PagedSearchIterable res = s.list();

for (GHRepository ghRepository : res) {
System.out.println(ghRepository.getFullName());;
}

And I get this error:
Exception in thread "main" java.lang.Error: java.net.ConnectException: Operation timed out
at org.kohsuke.github.Requester$1.fetch(Requester.java:396)
at org.kohsuke.github.Requester$1.hasNext(Requester.java:363)
at org.kohsuke.github.PagedSearchIterable$1.hasNext(PagedSearchIterable.java:46)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at com.inmobi.pratik.AppTest.main(AppTest.java:71)

Thanks,
Pratik

@KPRATIK
Copy link
Author

KPRATIK commented Jul 20, 2015

Looks like some network issue as this is working now.. Thanks

@KPRATIK KPRATIK closed this as completed Jul 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant