Skip to content

Commit

Permalink
make url methods return URL and add getApiUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
janinko committed Aug 31, 2012
1 parent 8031986 commit fff3272
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/kohsuke/github/GHIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public Date getClosedAt() {
return GitHub.parseDate(closed_at);
}

public URL getApiURL(){
return GitHub.parseURL(url);
}

/**
* Updates the issue by adding a comment.
*/
Expand Down
15 changes: 6 additions & 9 deletions src/main/java/org/kohsuke/github/GHSmallUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package org.kohsuke.github;

import java.io.IOException;
import java.net.URL;

/**
*
Expand All @@ -32,33 +33,29 @@
public class GHSmallUser {
private GitHub root;
private String avatar_url, login, url, gravatar_id;
private Long id;
private int id;

/*package*/ GHSmallUser wrapUp(GitHub root) {
this.root = root;
return this;
}


public String getAvatar_url() {
return avatar_url;
public URL getAvatar_url() {
return GitHub.parseURL(avatar_url);
}

public String getLogin() {
return login;
}

public String getUrl() {
return url;
public URL getApiUrl() {
return GitHub.parseURL(url);
}

public String getGravatar_id() {
return gravatar_id;
}

public Long getId() {
return id;
}

public GHUser getUser() throws IOException{
return root.getUser(login);
Expand Down

0 comments on commit fff3272

Please sign in to comment.