Skip to content

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

@KPRATIK

Description

@KPRATIK

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions