Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Ringle2012-04-09 18:29:56 +0000
committerKevin Sawicki2012-04-09 18:29:56 +0000
commit32a7c939091d84c5805f0d3fcdcf5d560e34fad4 (patch)
tree52b24156b2b009135fb27b68b7b04fb90b2ed50c
parent8b707fffe8dd84f7b6c577b063a2e03c0baac1a1 (diff)
downloadegit-github-32a7c939091d84c5805f0d3fcdcf5d560e34fad4.tar.gz
egit-github-32a7c939091d84c5805f0d3fcdcf5d560e34fad4.tar.xz
egit-github-32a7c939091d84c5805f0d3fcdcf5d560e34fad4.zip
Add missing note and note_url fields to Authorization
Change-Id: I3d23f91e0f8e1c2eedbe90b81fca7db7a3e21f84 Signed-off-by: Eddie Ringle <eddie@eringle.net> Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AuthorizationTest.java4
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Authorization.java36
2 files changed, 40 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AuthorizationTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AuthorizationTest.java
index b1a52c55..1d79fc89 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AuthorizationTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/AuthorizationTest.java
@@ -34,6 +34,8 @@ public class AuthorizationTest {
assertNull(auth.getApp());
assertNull(auth.getCreatedAt());
assertEquals(0, auth.getId());
+ assertNull(auth.getNote());
+ assertNull(auth.getNoteUrl());
assertNull(auth.getScopes());
assertNull(auth.getToken());
assertNull(auth.getUpdatedAt());
@@ -51,6 +53,8 @@ public class AuthorizationTest {
assertEquals(new Date(2500), auth.setCreatedAt(new Date(2500))
.getCreatedAt());
assertEquals(123, auth.setId(123).getId());
+ assertEquals("note", auth.setNote("note").getNote());
+ assertEquals("noteUrl", auth.setNoteUrl("noteUrl").getNoteUrl());
assertEquals(Collections.singletonList("repo"),
auth.setScopes(Collections.singletonList("repo")).getScopes());
assertEquals("token", auth.setToken("token").getToken());
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Authorization.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Authorization.java
index a0279645..4dbe8679 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Authorization.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/Authorization.java
@@ -34,6 +34,10 @@ public class Authorization implements Serializable {
private List<String> scopes;
+ private String note;
+
+ private String noteUrl;
+
private String token;
private String url;
@@ -103,6 +107,38 @@ public class Authorization implements Serializable {
}
/**
+ * @return note
+ */
+ public String getNote() {
+ return note;
+ }
+
+ /**
+ * @param note
+ * @return this authorization
+ */
+ public Authorization setNote(String note) {
+ this.note = note;
+ return this;
+ }
+
+ /**
+ * @return noteUrl
+ */
+ public String getNoteUrl() {
+ return noteUrl;
+ }
+
+ /**
+ * @param noteUrl
+ * @return this authorization
+ */
+ public Authorization setNoteUrl(String noteUrl) {
+ this.noteUrl = noteUrl;
+ return this;
+ }
+
+ /**
* @return scopes
*/
public List<String> getScopes() {

Back to the top