Skip to content

Commit 48d703f

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 8c680c5 + 372013a commit 48d703f

32 files changed

+441
-272
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [2.0.0] - 2024-04-09
8+
9+
- [#119](https://github.com/os2display/display-client/pull/119)
10+
- Changed to v2 routing.
11+
- Limited the number of API calls by comparing relationsChecksum.
12+
713
## [1.3.5] - 2023-09-14
814

915
- [#115](https://github.com/os2display/display-client/pull/115)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ See `public/example_config.json` for values.
1010
```json
1111
{
1212
"apiEndpoint": "",
13-
"authenticationEndpoint": "/v1/authentication/screen",
14-
"authenticationRefreshTokenEndpoint": "/v1/authentication/token/refresh",
13+
"authenticationEndpoint": "/v2/authentication/screen",
14+
"authenticationRefreshTokenEndpoint": "/v2/authentication/token/refresh",
1515
"dataStrategy": {
1616
"type": "pull",
1717
"config": {

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"viewportHeight": 1400,
77
"baseUrl": "http://client/",
88
"retries": {
9-
"runMode": 2,
9+
"runMode": 1,
1010
"openMode": 0
1111
}
1212
}

cypress/fixtures/actual-template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@type": "Template",
3-
"@id": "/v1/templates/01FP2SNGFN0BZQH03KCBXHKYHG",
3+
"@id": "/v2/templates/01FP2SNGFN0BZQH03KCBXHKYHG",
44
"title": "Billede og tekst",
55
"description": "Mulighed for at sætte billede og tekst, med forskellige visninger.",
66
"created": "2021-12-04T13:20:51+01:00",

cypress/fixtures/campaign-slide.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"@id": "/v1/playlist-slides",
2+
"@id": "/v2/playlist-slides",
33
"@type": "hydra:Collection",
44
"hydra:member": [
55
{
66
"@type": "PlaylistSlide",
7-
"@id": "/v1/playlist-slides/01FYHVQFA2KZQS4PXZ968WDFN8",
7+
"@id": "/v2/playlist-slides/01FYHVQFA2KZQS4PXZ968WDFN8",
88
"slide": {
99
"@type": "Slide",
10-
"@id": "/v1/slides/01FYHVH36TA5AG3X8ZV7KXVVAK",
10+
"@id": "/v2/slides/01FYHVH36TA5AG3X8ZV7KXVVAK",
1111
"title": "Slide 2",
1212
"description": "",
1313
"created": "2022-03-19T20:47:35+01:00",
1414
"modified": "2022-03-19T20:47:35+01:00",
1515
"modifiedBy": "[email protected]",
1616
"createdBy": "[email protected]",
1717
"templateInfo": {
18-
"@id": "/v1/templates/01FP2SNGFN0BZQH03KCBXHKYHG",
18+
"@id": "/v2/templates/01FP2SNGFN0BZQH03KCBXHKYHG",
1919
"options": []
2020
},
2121
"theme": "",
2222
"onPlaylists": [
23-
"/v1/playlists/01FYHVQEKNQ5RGQNCW497M71M6"
23+
"/v2/playlists/01FYHVQEKNQ5RGQNCW497M71M6"
2424
],
2525
"duration": null,
2626
"published": {
@@ -32,6 +32,12 @@
3232
"title": "Campaign",
3333
"text": "\u003Cp\u003ECampaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign campaign\u003C/p\u003E"
3434
},
35+
"relationsChecksum": {
36+
"templateInfo": "2023-12-21T23:47:00+01:00",
37+
"onPlaylists": "2023-12-21T23:47:00+01:00",
38+
"media": null,
39+
"theme": null
40+
},
3541
"feed": null
3642
},
3743
"weight": 0

cypress/fixtures/campaigns-empty.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"@id": "/v1/screen-campaigns",
2+
"@id": "/v2/screen-campaigns",
33
"@type": "hydra:Collection",
44
"hydra:member": [],
55
"hydra:totalItems": 0

cypress/fixtures/campaigns.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
{
2-
"@id": "/v1/screen-campaigns",
2+
"@id": "/v2/screen-campaigns",
33
"@type": "hydra:Collection",
44
"hydra:member": [
55
{
66
"@type": "ScreenCampaign",
7-
"@id": "/v1/screen-campaigns/01FYHVQF96GN4RWZV9YYVW3PCM",
7+
"@id": "/v2/screen-campaigns/01FYHVQF96GN4RWZV9YYVW3PCM",
88
"campaign": {
99
"@type": "Playlist",
10-
"@id": "/v1/playlists/01FYHVQEKNQ5RGQNCW497M71M6",
10+
"@id": "/v2/playlists/01FYHVQEKNQ5RGQNCW497M71M6",
1111
"title": "campaign",
1212
"description": "",
1313
"schedules": [],
1414
"created": "2000-03-19T20:51:03+01:00",
1515
"modified": "2050-03-19T20:51:03+01:00",
1616
"modifiedBy": "[email protected]",
1717
"createdBy": "[email protected]",
18-
"slides": "/v1/playlists/01FYHVQEKNQ5RGQNCW497M71M6/slides",
18+
"slides": "/v2/playlists/01FYHVQEKNQ5RGQNCW497M71M6/slides",
1919
"campaignScreens": [
20-
"/v1/screens/01FYEDW1N133SG516JVJ3VG5FY"
20+
"/v2/screens/01FYEDW1N133SG516JVJ3VG5FY"
2121
],
2222
"campaignScreenGroups": [],
2323
"isCampaign": true,
2424
"published": {
2525
"from": "2022-03-19T19:50:00+01:00",
2626
"to": "2036-12-20T19:50:00+01:00"
27+
},
28+
"relationsChecksum": {
29+
"campaignScreens": "2023-12-21T23:47:00+01:00",
30+
"campaignScreenGroups": "2023-12-21T23:47:00+01:00",
31+
"slides": "2023-12-21T23:47:00+01:00"
2732
}
2833
}
2934
}

cypress/fixtures/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"authenticationEndpoint": "https://displayapiservice.local.itkdev.dk/v1/authentication/screen",
3-
"authenticationRefreshTokenEndpoint": "https://displayapiservice.local.itkdev.dk/v1/authentication/token/refresh",
2+
"authenticationEndpoint": "https://displayapiservice.local.itkdev.dk/v2/authentication/screen",
3+
"authenticationRefreshTokenEndpoint": "https://displayapiservice.local.itkdev.dk/v2/authentication/token/refresh",
44
"dataStrategy": {
55
"type": "pull",
66
"config": {
77
"interval": 4000,
88
"endpoint": "https://displayapiservice.local.itkdev.dk",
9-
"entryPoint": "/v1/screens/01FVVYJKN3EZS829CK5DG7RP7A"
9+
"entryPoint": "/v2/screens/01FVVYJKN3EZS829CK5DG7RP7A"
1010
}
1111
},
1212
"schedulingInterval": 60000,

cypress/fixtures/layout-split.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
{
22
"@type": "ScreenLayout",
3-
"@id": "/v1/layouts/01FMYMBPSJQ7SG7BZZ1N8TB7GW",
3+
"@id": "/v2/layouts/01FMYMBPSJQ7SG7BZZ1N8TB7GW",
44
"title": "2-delt",
55
"grid": {
66
"rows": 2,
77
"columns": 1
88
},
99
"regions": [
1010
{
11-
"@id": "/v1/layouts/regions/01FYHZ62T7DXZ0YBM57NCYSX5E",
11+
"@id": "/v2/layouts/regions/01FYHZ62T7DXZ0YBM57NCYSX5E",
1212
"@type": "ScreenLayoutRegions",
1313
"title": "Venstre",
1414
"gridArea": [
1515
"a"
1616
]
1717
},
1818
{
19-
"@id": "/v1/layouts/regions/01FYHZ62T8H6QGRXPJC7RYZYNY",
19+
"@id": "/v2/layouts/regions/01FYHZ62T8H6QGRXPJC7RYZYNY",
2020
"@type": "ScreenLayoutRegions",
2121
"title": "Højre",
2222
"gridArea": [
2323
"b"
2424
]
2525
}
26-
]
26+
],
27+
"relationsChecksum": {
28+
"regions": "2023-12-21T23:47:00+01:00"
29+
}
2730
}

cypress/fixtures/layout.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
22
"@type": "ScreenLayout",
3-
"@id": "/v1/layouts/01FMYMAB1EQYQ40QE0C7Y6NVBK",
3+
"@id": "/v2/layouts/01FMYMAB1EQYQ40QE0C7Y6NVBK",
44
"title": "Fuld skærm",
55
"grid": {
66
"rows": 1,
77
"columns": 1
88
},
99
"regions": [
1010
{
11-
"@id": "/v1/layouts/regions/01FYEDQKCJTVBY9ZGF57R9Q5FT",
11+
"@id": "/v2/layouts/regions/01FYEDQKCJTVBY9ZGF57R9Q5FT",
1212
"@type": "ScreenLayoutRegions",
1313
"title": "Skærmområde",
1414
"gridArea": [
1515
"a"
1616
]
1717
}
18-
]
18+
],
19+
"relationsChecksum": {
20+
"regions": "2023-12-21T23:47:00+01:00"
21+
}
1922
}

cypress/fixtures/media.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@type": "Media",
3-
"@id": "/v1/media/0007JD5AT619540YKH0J1V18C2",
3+
"@id": "/v2/media/0007JD5AT619540YKH0J1V18C2",
44
"title": "Qui magnam provident.",
55
"description": "Fugiat modi unde modi. Eius commodi fuga ratione vel voluptatem accusamus autem. Officiis expedita tempora ut voluptatem magnam ea.",
66
"license": "Attribution-NonCommercial-NoDerivs License",

cypress/fixtures/playlist-not-published.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"@id": "/v1/playlist-screen-regions",
2+
"@id": "/v2/playlist-screen-regions",
33
"@type": "hydra:Collection",
44
"hydra:member": [
55
{
66
"@type": "PlaylistScreenRegion",
7-
"@id": "/v1/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
7+
"@id": "/v2/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
88
"playlist": {
99
"@type": "Playlist",
10-
"@id": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
10+
"@id": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
1111
"title": "Spilleliste test",
1212
"description": "",
1313
"schedules": [],
1414
"created": "2022-03-18T12:50:39+01:00",
1515
"modified": "2022-03-19T21:45:40+01:00",
1616
"modifiedBy": "[email protected]",
1717
"createdBy": "[email protected]",
18-
"slides": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
18+
"slides": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
1919
"campaignScreens": [],
2020
"campaignScreenGroups": [],
2121
"isCampaign": false,
2222
"published": {
2323
"from": "2022-03-11T11:50:00+01:00",
2424
"to": "2022-03-12T11:50:00+01:00"
25+
},
26+
"relationsChecksum": {
27+
"slides": "2023-12-21T23:47:00+01:00",
28+
"campaignScreens": "2023-12-21T23:47:00+01:00",
29+
"campaignScreenGroups": "2023-12-21T23:47:00+01:00"
2530
}
2631
},
2732
"weight": 0

cypress/fixtures/playlist-with-schedule.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"@id": "/v1/playlist-screen-regions",
2+
"@id": "/v2/playlist-screen-regions",
33
"@type": "hydra:Collection",
44
"hydra:member": [
55
{
66
"@type": "PlaylistScreenRegion",
7-
"@id": "/v1/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
7+
"@id": "/v2/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
88
"playlist": {
99
"@type": "Playlist",
10-
"@id": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
10+
"@id": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
1111
"title": "Spilleliste test",
1212
"description": "",
1313
"schedules": [
@@ -26,13 +26,18 @@
2626
"modified": "2022-03-18T12:50:43+01:00",
2727
"modifiedBy": "[email protected]",
2828
"createdBy": "[email protected]",
29-
"slides": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
29+
"slides": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
3030
"campaignScreens": [],
3131
"campaignScreenGroups": [],
3232
"isCampaign": false,
3333
"published": {
3434
"from": "2022-03-18T11:50:00+01:00",
3535
"to": "2034-10-18T10:50:00+02:00"
36+
},
37+
"relationsChecksum": {
38+
"slides": "2023-12-21T23:47:00+01:00",
39+
"campaignScreens": "2023-12-21T23:47:00+01:00",
40+
"campaignScreenGroups": "2023-12-21T23:47:00+01:00"
3641
}
3742
},
3843
"weight": 0

cypress/fixtures/playlists-empty.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"@id": "/v1/playlist-screen-regions",
2+
"@id": "/v2/playlist-screen-regions",
33
"@type": "hydra:Collection",
44
"hydra:member": [],
55
"hydra:totalItems": 0

cypress/fixtures/playlists.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"@id": "/v1/playlist-screen-regions",
2+
"@id": "/v2/playlist-screen-regions",
33
"@type": "hydra:Collection",
44
"hydra:member": [
55
{
66
"@type": "PlaylistScreenRegion",
7-
"@id": "/v1/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
7+
"@id": "/v2/playlist-screen-regions/01FYEDW287N2KCH595ERPJC5CX",
88
"playlist": {
99
"@type": "Playlist",
10-
"@id": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
10+
"@id": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH",
1111
"title": "Spilleliste test",
1212
"description": "",
1313
"schedules": [],
1414
"created": "2022-03-18T12:50:39+01:00",
1515
"modified": "2022-03-18T12:50:43+01:00",
1616
"modifiedBy": "[email protected]",
1717
"createdBy": "[email protected]",
18-
"slides": "/v1/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
18+
"slides": "/v2/playlists/01FYEDV33FTQVHG0K3PK7N2GXH/slides",
1919
"campaignScreens": [],
2020
"campaignScreenGroups": [],
2121
"isCampaign": false,
2222
"published": {
2323
"from": "2022-03-18T11:50:00+01:00",
2424
"to": "2034-10-18T10:50:00+02:00"
25+
},
26+
"relationsChecksum": {
27+
"slides": "2023-12-21T23:47:00+01:00",
28+
"campaignScreens": "2023-12-21T23:47:00+01:00",
29+
"campaignScreenGroups": "2023-12-21T23:47:00+01:00"
2530
}
2631
},
2732
"weight": 0
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
{
22
"@type": "Screen",
3-
"@id": "/v1/screens/01FYEDW1N133SG516JVJ3VG5FY",
3+
"@id": "/v2/screens/01FYEDW1N133SG516JVJ3VG5FY",
44
"title": "Skærm",
55
"description": "",
66
"size": "0",
77
"created": "2022-03-18T12:51:10+01:00",
88
"modified": "2022-03-19T21:51:59+01:00",
99
"modifiedBy": "[email protected]",
1010
"createdBy": "[email protected]",
11-
"campaigns": "/v1/screens/01FYEDW1N133SG516JVJ3VG5FY/campaigns",
12-
"layout": "/v1/layouts/01FMYMBPSJQ7SG7BZZ1N8TB7GW",
11+
"campaigns": "/v2/screens/01FYEDW1N133SG516JVJ3VG5FY/campaigns",
12+
"layout": "/v2/layouts/01FMYMBPSJQ7SG7BZZ1N8TB7GW",
1313
"location": "",
1414
"regions": [
15-
"/v1/screens/01FYEDW1N133SG516JVJ3VG5FY/regions/01FYHZ62T7DXZ0YBM57NCYSX5E/playlists",
16-
"/v1/screens/01FYEDW1N133SG516JVJ3VG5FY/regions/01FYHZ62T8H6QGRXPJC7RYZYNY/playlists"
15+
"/v2/screens/01FYEDW1N133SG516JVJ3VG5FY/regions/01FYHZ62T7DXZ0YBM57NCYSX5E/playlists",
16+
"/v2/screens/01FYEDW1N133SG516JVJ3VG5FY/regions/01FYHZ62T8H6QGRXPJC7RYZYNY/playlists"
1717
],
18-
"inScreenGroups": "/v1/screens/01FYEDW1N133SG516JVJ3VG5FY/screen-groups",
18+
"inScreenGroups": "/v2/screens/01FYEDW1N133SG516JVJ3VG5FY/screen-groups",
1919
"dimensions": {
2020
"width": 0,
2121
"height": 0
2222
},
23-
"screenUser": "01FYHYD35YMBX97EA2V3QJMEMH"
23+
"screenUser": "01FYHYD35YMBX97EA2V3QJMEMH",
24+
"relationsChecksum": {
25+
"layout": "2023-12-21T23:47:00+01:00",
26+
"regions": "2023-12-21T23:47:00+01:00",
27+
"inScreenGroups": "2023-12-21T23:47:00+01:00",
28+
"campaigns": "2023-12-21T23:47:00+01:00"
29+
}
2430
}

0 commit comments

Comments
 (0)