A small app using the Wikidata API to show upcoming movies. https://daniel-michel.github.io/release_schedule/
 
 
 
 
 
 
Go to file
daniel-michel 74260ea1b8 docs: updated query 2023-11-16 17:24:38 +01:00
.github/workflows docs: create readme 2023-11-16 17:07:19 +01:00
android fix: update workflows and change AndroidManifest 2023-11-16 15:59:37 +01:00
ios initial commit 2023-11-05 19:32:59 +01:00
lib refactor: simplify upcoming movie query 2023-11-16 17:02:53 +01:00
linux initial commit 2023-11-05 19:32:59 +01:00
macos Add local caching of movies 2023-11-08 14:43:59 +01:00
screenshots docs: create readme 2023-11-16 17:07:19 +01:00
test fix: remove unused import 2023-11-16 15:09:25 +01:00
web initial commit 2023-11-05 19:32:59 +01:00
windows initial commit 2023-11-05 19:32:59 +01:00
.gitignore initial commit 2023-11-05 19:32:59 +01:00
.metadata initial commit 2023-11-05 19:32:59 +01:00
README.md docs: updated query 2023-11-16 17:24:38 +01:00
analysis_options.yaml initial commit 2023-11-05 19:32:59 +01:00
pubspec.lock test: add test for relative date texts 2023-11-16 13:28:21 +01:00
pubspec.yaml test: add test for relative date texts 2023-11-16 13:28:21 +01:00

README.md

Release Schedule

A small app using the Wikidata API to show upcoming movies.

You can try out the live web version at daniel-michel.github.io/release_schedule.

Android and Linux builds can be found in the latest build run.

Currently, only a simple list of upcoming movies is shown:

The floating button at the bottom right can be used to load the upcoming movies and the button at the top right to clear the movies that where already loaded.

Wikidata API

The Implementation can be found at ./lib/api/wikidata_movie_api.dart.

To get information about the upcoming movies multiple APIs are used.

First the SPARQL API is used to retrieve upcoming movies using the endpoint "https://query.wikidata.org/sparql" with the following query:

SELECT
  ?movie
  (MIN(?releaseDate) as ?minReleaseDate)
WHERE {
  ?movie wdt:P31 wd:Q11424;         # Q11424 is the item for "film"
         wdt:P577 ?releaseDate.      # P577 is the "publication date" property
  FILTER (xsd:date(?releaseDate) >= xsd:date("$date"^^xsd:dateTime))
}
GROUP BY ?movie
ORDER BY ?minReleaseDate
LIMIT $limit

Where $limit is the maximum number of movies that are retrieved and $date the starting date from which movies are retrieved. $limit is currently set to 100 and $date one week before the current one. However, because there are multiple publication dates for most movies, the retrieved movies just need to have one publication date that is on or after $date for the movie to be included in the result. The minReleaseDate is not necessarily the release date displayed in the App, therefore some movies in the App might show up as having been released a long time ago.

To get additional information about the movies and all release dates (in case some are before $date and some after) the API endpoint "https://www.wikidata.org/w/api.php?action=wbgetentities" is used.