aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-14 17:56:52 (EDT)
committerChris Aniszczyk2011-04-15 11:07:58 (EDT)
commit1ea5ffc1d7badbab238e6500f30c7f9888039171 (patch)
tree1bb4d8be0329520036938f0af7403c7f5390c6a6
parentc3d1a3ba9603b6702673fdba90e2d5d83942f3aa (diff)
downloadegit-github-1ea5ffc1d7badbab238e6500f30c7f9888039171.zip
egit-github-1ea5ffc1d7badbab238e6500f30c7f9888039171.tar.gz
egit-github-1ea5ffc1d7badbab238e6500f30c7f9888039171.tar.bz2
Add gist history model classesrefs/changes/28/3128/2
Change-Id: I1b5d05748ebb2897e4a8b79b9fc04e7e38b25d13 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java10
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistChangeStatus.java45
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistRevision.java65
3 files changed, 120 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
index 99e3450..db1804e 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
@@ -11,6 +11,7 @@
package org.eclipse.mylyn.github.internal;
import java.util.Date;
+import java.util.List;
import java.util.Map;
import com.google.gson.annotations.SerializedName;
@@ -27,6 +28,8 @@ public class Gist {
private int comments;
+ private List<GistRevision> history;
+
private Map<String, GistFile> files;
private String description;
@@ -120,6 +123,13 @@ public class Gist {
}
/**
+ * @return history
+ */
+ public List<GistRevision> getHistory() {
+ return this.history;
+ }
+
+ /**
* @return id
*/
public String getId() {
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistChangeStatus.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistChangeStatus.java
new file mode 100644
index 0000000..f164bcc
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistChangeStatus.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.github.internal;
+
+/**
+ * Gist change status class.
+ */
+public class GistChangeStatus {
+
+ private int additions;
+
+ private int deletions;
+
+ private int total;
+
+ /**
+ * @return additions
+ */
+ public int getAdditions() {
+ return this.additions;
+ }
+
+ /**
+ * @return deletions
+ */
+ public int getDeletions() {
+ return this.deletions;
+ }
+
+ /**
+ * @return total
+ */
+ public int getTotal() {
+ return this.total;
+ }
+
+}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistRevision.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistRevision.java
new file mode 100644
index 0000000..60bab86
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GistRevision.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.github.internal;
+
+import java.util.Date;
+
+/**
+ * Gist revision class.
+ */
+public class GistRevision {
+
+ private Date committedAt;
+
+ private GistChangeStatus changeStatus;
+
+ private String url;
+
+ private String version;
+
+ private User user;
+
+ /**
+ * @return committedAt
+ */
+ public Date getCommittedAt() {
+ return this.committedAt;
+ }
+
+ /**
+ * @return changeStatus
+ */
+ public GistChangeStatus getChangeStatus() {
+ return this.changeStatus;
+ }
+
+ /**
+ * @return url
+ */
+ public String getUrl() {
+ return this.url;
+ }
+
+ /**
+ * @return version
+ */
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * @return user
+ */
+ public User getUser() {
+ return this.user;
+ }
+
+}