Skip to content

Commit 80e9a10

Browse files
committed
Extend the ucp history by the new id field
1 parent 0513b1d commit 80e9a10

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

library/src/main/java/me/proxer/library/entity/ucp/UcpHistoryEntry.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ public class UcpHistoryEntry implements ProxerIdItem, ProxerDateItem {
2626
* {@inheritDoc}
2727
*/
2828
@Getter(onMethod = @__({@Override}))
29-
@Json(name = "eid")
29+
@Json(name = "id")
3030
private String id;
3131

32+
/**
33+
* Returns the id of the associated {@link me.proxer.library.entity.info.Entry}.
34+
*/
35+
@Json(name = "eid")
36+
private String entryId;
37+
3238
/**
3339
* Returns the name.
3440
*/

library/src/test/java/me/proxer/library/api/ucp/UcpHistoryEndpointTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void testPath() throws ProxerException, IOException, InterruptedException
4747
}
4848

4949
private UcpHistoryEntry buildTestEntry() throws ParseException {
50-
return new UcpHistoryEntry("14701", "Nejimaki Seirei Senki: Tenkyou no Alderamin",
50+
return new UcpHistoryEntry("407661627", "14701", "Nejimaki Seirei Senki: Tenkyou no Alderamin",
5151
MediaLanguage.ENGLISH_SUB, Medium.ANIMESERIES, Category.ANIME, 1,
5252
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse("2017-03-13 23:16:36"));
5353
}

library/src/test/resources/ucp_history.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"message": "Abfrage erfolgreich",
44
"data": [
55
{
6+
"id": "407661627",
67
"eid": "14701",
78
"language": "engsub",
89
"name": "Nejimaki Seirei Senki: Tenkyou no Alderamin",
@@ -12,6 +13,7 @@
1213
"timestamp": "2017-03-13 23:16:36"
1314
},
1415
{
16+
"id": "407661626",
1517
"eid": "4167",
1618
"language": "engsub",
1719
"name": "Sword Art Online",
@@ -21,6 +23,7 @@
2123
"timestamp": "2017-03-13 23:13:48"
2224
},
2325
{
26+
"id": "407661625",
2427
"eid": "17176",
2528
"language": "engsub",
2629
"name": "Masamune-kun no Revenge",
@@ -30,6 +33,7 @@
3033
"timestamp": "2017-03-13 01:48:33"
3134
},
3235
{
36+
"id": "407661624",
3337
"eid": "16656",
3438
"language": "engsub",
3539
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -39,6 +43,7 @@
3943
"timestamp": "2017-03-12 01:22:42"
4044
},
4145
{
46+
"id": "407661623",
4247
"eid": "16656",
4348
"language": "gersub",
4449
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -48,6 +53,7 @@
4853
"timestamp": "2017-03-12 01:01:42"
4954
},
5055
{
56+
"id": "407661622",
5157
"eid": "16656",
5258
"language": "gersub",
5359
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -57,6 +63,7 @@
5763
"timestamp": "2017-03-12 00:47:01"
5864
},
5965
{
66+
"id": "407661621",
6067
"eid": "16656",
6168
"language": "gersub",
6269
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -66,6 +73,7 @@
6673
"timestamp": "2017-03-12 00:39:48"
6774
},
6875
{
76+
"id": "407661620",
6977
"eid": "16656",
7078
"language": "gersub",
7179
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -75,6 +83,7 @@
7583
"timestamp": "2017-03-12 00:18:23"
7684
},
7785
{
86+
"id": "407661619",
7887
"eid": "16656",
7988
"language": "gersub",
8089
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -84,6 +93,7 @@
8493
"timestamp": "2017-03-11 23:42:20"
8594
},
8695
{
96+
"id": "407661618",
8797
"eid": "16656",
8898
"language": "gersub",
8999
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -93,6 +103,7 @@
93103
"timestamp": "2017-03-11 23:06:16"
94104
},
95105
{
106+
"id": "407661617",
96107
"eid": "16656",
97108
"language": "gersub",
98109
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -102,6 +113,7 @@
102113
"timestamp": "2017-03-11 22:45:09"
103114
},
104115
{
116+
"id": "407661616",
105117
"eid": "16656",
106118
"language": "gersub",
107119
"name": "Kobayashi-san Chi no Maid Dragon",
@@ -111,6 +123,7 @@
111123
"timestamp": "2017-03-11 22:23:18"
112124
},
113125
{
126+
"id": "407661615",
114127
"eid": "16656",
115128
"language": "gersub",
116129
"name": "Kobayashi-san Chi no Maid Dragon",

0 commit comments

Comments
 (0)