Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.17 KB

github.adoc

File metadata and controls

39 lines (29 loc) · 1.17 KB

Java SDK

package com.example;

import java.io.IOException;
import java.util.List;

import org.eclipse.egit.github.core.service.UserService;
import org.junit.Test;

import com.github.maven.plugins.core.egit.GitHubClientEgit;

public class GithubClientTest {

	@Test
	public void test() throws IOException {
		GitHubClientEgit client = new GitHubClientEgit("github.com");
		client.setOAuth2Token("?????");
		UserService service = new UserService(client);
		List<String> emails = service.getEmails();
		System.out.println(emails);
	}
}