Skip to content

Commit f7e58a1

Browse files
authored
Merge pull request #231 from os2display/feature/eventdatabasen-v2
New feed source: Eventdatabasen v2
2 parents 571cc61 + 9239248 commit f7e58a1

File tree

17 files changed

+684
-1
lines changed

17 files changed

+684
-1
lines changed

.env

+2
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,5 @@ CALENDAR_API_FEED_SOURCE_DATE_FORMAT=
103103
CALENDAR_API_FEED_SOURCE_DATE_TIMEZONE=
104104
CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS=300
105105
###< Calendar Api Feed Source ###
106+
107+
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS=300

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- [#231](https://github.com/os2display/display-api-service/pull/231)
8+
- Adds new feed source: Eventdatabasen v2.
79
- [#233](https://github.com/os2display/display-api-service/pull/233)
810
- Added calendar api feed source tests for modifiers.
911
- Changed to use PCRE pattern instead of custom pattern building and fixed modifier bugs for calendar api feed source.

config/packages/cache.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ framework:
1717
# Default expire set to 5 minutes
1818
default_lifetime: 300
1919

20+
feed.without.expire.cache:
21+
adapter: cache.adapter.redis
22+
2023
# Creates a "calendar.api.cache" service
2124
calendar.api.cache:
2225
adapter: cache.adapter.redis

config/services.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ services:
5151
Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface: '@Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationFailureHandler'
5252
Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface: '@Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationSuccessHandler'
5353

54+
App\Feed\EventDatabaseApiV2FeedType:
55+
arguments:
56+
$cacheExpire: '%env(int:EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS)%'
57+
5458
App\Feed\CalendarApiFeedType:
5559
arguments:
5660
$locationEndpoint: '%env(string:CALENDAR_API_FEED_SOURCE_LOCATION_ENDPOINT)%'

infrastructure/itkdev/display-api-service/etc/confd/templates/env.local.tmpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ CALENDAR_API_FEED_SOURCE_CUSTOM_MAPPINGS={{ getenv "APP_CALENDAR_API_FEED_SOURCE
6060
CALENDAR_API_FEED_SOURCE_EVENT_MODIFIERS={{ getenv "APP_CALENDAR_API_FEED_SOURCE_EVENT_MODIFIERS" "'{}'" }}
6161
CALENDAR_API_FEED_SOURCE_DATE_FORMAT={{ getenv "APP_CALENDAR_API_FEED_SOURCE_DATE_FORMAT" "" }}
6262
CALENDAR_API_FEED_SOURCE_DATE_TIMEZONE={{ getenv "APP_CALENDAR_API_FEED_SOURCE_DATE_TIMEZONE" "" }}
63-
CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS={{ getenv "CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS" "300" }}
63+
CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS={{ getenv "APP_CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS" "300" }}
6464
###< Calendar Api Feed Source ###
65+
66+
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS={{ getenv "APP_EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS" "300" }}

infrastructure/os2display/display-api-service/etc/confd/templates/env.local.tmpl

+2
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ CALENDAR_API_FEED_SOURCE_DATE_FORMAT={{ getenv "APP_CALENDAR_API_FEED_SOURCE_DAT
6262
CALENDAR_API_FEED_SOURCE_DATE_TIMEZONE={{ getenv "APP_CALENDAR_API_FEED_SOURCE_DATE_TIMEZONE" "" }}
6363
CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS={{ getenv "CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS" "300" }}
6464
###< Calendar Api Feed Source ###
65+
66+
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS={{ getenv "APP_EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS" "300" }}

src/Feed/EventDatabaseApiFeedType.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Symfony\Contracts\HttpClient\HttpClientInterface;
1616

1717
/**
18+
* @deprecated
19+
*
1820
* See https://github.com/itk-event-database/event-database-api.
1921
*/
2022
class EventDatabaseApiFeedType implements FeedTypeInterface

0 commit comments

Comments
 (0)