Skip to content

Commit 2c80ef1

Browse files
committed
Capture commonality between total and daily
1 parent 9af8112 commit 2c80ef1

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/main/java/org/kohsuke/github/GHRepositoryTrafficInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Date;
44
import java.util.List;
55

6-
public abstract class GHRepositoryTrafficInfo {
6+
public abstract class GHRepositoryTrafficInfo implements TrafficInfo {
77
private int count;
88
private int uniques;
99

@@ -25,7 +25,7 @@ public int getUniques() {
2525

2626
public abstract List<? extends DayInfo> getDailyInfo();
2727

28-
public static abstract class DayInfo {
28+
public static abstract class DayInfo implements TrafficInfo {
2929
private Date timestamp;
3030
private int count;
3131
private int uniques;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.kohsuke.github;
2+
3+
/**
4+
* @author Kohsuke Kawaguchi
5+
*/
6+
public interface TrafficInfo {
7+
/**
8+
* Total count of hits.
9+
*/
10+
int getCount();
11+
12+
/**
13+
* Unique visitors.
14+
*/
15+
int getUniques();
16+
}

0 commit comments

Comments
 (0)