mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
got rid of all retrieveXYZ methods in favor of Poster
This commit is contained in:
@@ -22,7 +22,7 @@ public class GHMyself extends GHUser {
|
||||
* Always non-null.
|
||||
*/
|
||||
public List<String> getEmails() throws IOException {
|
||||
String[] addresses = root.retrieveWithAuth("/user/emails", String[].class);
|
||||
String[] addresses = root.retrieve().withCredential().to("/user/emails", String[].class);
|
||||
return Collections.unmodifiableList(Arrays.asList(addresses));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class GHMyself extends GHUser {
|
||||
* Always non-null.
|
||||
*/
|
||||
public List<GHKey> getPublicKeys() throws IOException {
|
||||
return Collections.unmodifiableList(Arrays.asList(root.retrieveWithAuth("/user/keys", GHKey[].class)));
|
||||
return Collections.unmodifiableList(Arrays.asList(root.retrieve().withCredential().to("/user/keys", GHKey[].class)));
|
||||
}
|
||||
|
||||
// public void addEmails(Collection<String> emails) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user