我想根据大小和关键字参数搜索

Github repos.这是我写的Java代码:

package searchTest;

import java.io.IOException;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import org.eclipse.egit.github.core.SearchRepository;

import org.eclipse.egit.github.core.client.GitHubClient;

import org.eclipse.egit.github.core.service.RepositoryService;

public class GithubSearch {

private static Map searchQuery = new HashMap();

public static void main(String[] args) throws IOException {

GitHubClient client = new GitHubClient();

client.setCredentials("username", "password");

RepositoryService service = new RepositoryService(client);

searchQuery.put("keyword","microsoft");

searchQuery.put("size","304");

List searchRes = service.searchRepositories(searchQuery);

System.out.println("Search result "+searchRes.toString());

}

}

但我得到的输出是空的:

Search result []

我检查了GitHub Java API javadoc,但找不到解决方案.

谢谢!

Logo

免费领 150 小时云算力,进群参与显卡、AI PC 幸运抽奖

更多推荐