Skip to content

Commit

Permalink
add scripts and new endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Aug 9, 2024
1 parent cb1e8e6 commit 2d71888
Show file tree
Hide file tree
Showing 16 changed files with 1,233 additions and 42 deletions.
60 changes: 42 additions & 18 deletions docs/urls.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,82 @@
[
{
"description": "[Homepage] get the contents (title and abstract) for the Home page",
"url": "/api/story/home"
"url": "/api/story/home",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"description": "[Menu] get the list of stories that composes the Menu, basically all stories tagged with `menu` tag. The `slug` property of each story is prefixed with `level-` followed by a number, this way the list is easily ordered. Every story has a `slug` property that is used as identifier",
"url": "/api/story/?filters={%22tags__slug%22:%22menu%22}&order_by=slug&limit=10"
"url": "/api/story/?filters={\"tags__slug\":\"menu\"}&order_by=slug&limit=10",
"hash": "d159095c9a67b4a002ed8a5c522df27440e74f0f58af01bd93b7d38de7ad7bfa"
},
{
"description": "[level 1] Content of the object of type Story",
"url": "/api/story/level-01-journeys"
"url": "/api/story/level-01-journeys",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"description": "[level 1] get all 'capsules' linked to the story with slug `level-01-journeys` that contains a geographic location",
"url": "/api/story/?filters={%22mentioned_to__slug%22%3A%22level-01-journeys%22,%22covers__data__type%22:%22place%22}&limit=100"
"url": "/api/story/?filters={\"mentioned_to__slug\"%3A\"level-01-journeys\",\"covers__data__type\":\"place\"}&limit=100",
"hash": "4a75fb8cbf80d23b000166e1dbc06eb397d542efaa28a7f89ceb914fb95c051b"
},
{
"description": "[Level 1] get all location linked to the video capsule stories mentioned to the story with slug `level-01-journeys`; return the list unsorted",
"url": "/api/document/?filters={%22data__type%22:%22place%22,%22stories__mentioned_to__slug%22:%22level-01-journeys%22}&limit=100"
"url": "/api/document/?filters={\"data__type\":\"place\",\"stories__mentioned_to__slug\":\"level-01-journeys\"}&limit=100",
"hash": "e8f4db59f555a97d2af57daca0bd44b112dec05309cee0474f00eff1e963d031"
},
{
"description": "[Level 1] get all stories mentioned to `level-01-journeys` (st Joseph Clinic with video cover is one of them)",
"url": "/api/story/?filters={%22mentioned_to__slug%22:%22level-01-journeys%22}&limit=100"
"url": "/api/story/?filters={\"mentioned_to__slug\":\"level-01-journeys\"}&limit=100",
"hash": "95b555c4c61747123a8af05153c5675887579d25731a46106ba204937e2d9ef1"
},
{
"description": "[Level 1] get all properties and all related documents and related stories to `st-joseph-clinic`",
"url": "/api/story/st-joseph-clinic"
"url": "/api/story/st-joseph-clinic",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"url": "/api/story?filters={%22tags__slug%22:%22theme%22}",
"description": "Get all stories with the tag 'theme'"
"url": "/api/story?filters={\"tags__slug\":\"theme\"}",
"description": "Get all stories with the tag 'theme'",
"hash": "2c6ef15591a4dd4b95133af345082155b08e094217d0b4c288ceafc9335024bd"
},
{
"url": "/api/story?filters={%22mentioned_to__slug%22:%22theme-02-reagir-a-lannexion%22}",
"description": "Get all stories that mention the story with the slug 'theme-02-reagir-a-lannexion'"
"url": "/api/story?filters={\"mentioned_to__slug\":\"theme-02-reagir-a-lannexion\"}",
"description": "Get all stories that mention the story with the slug 'theme-02-reagir-a-lannexion'",
"hash": "064252d4ab3f236e431ebc478d2c9594a5b0b58c234e86a28eb9570e75a60de4"
},
{
"url": "/api/story/theme-01-vivre-sous-lannexion",
"description": "Get the story with the slug 'theme-01-vivre-sous-lannexion'"
"description": "Get the story with the slug 'theme-01-vivre-sous-lannexion'",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"url": "/api/story/theme-02-reagir-a-lannexion",
"description": "Get the story with the slug 'theme-02-reagir-a-lannexion'"
"description": "Get the story with the slug 'theme-02-reagir-a-lannexion'",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"url": "/api/story/note-01-entering-the-war",
"description": "Get the story with the slug 'note-01-entering-the-war'"
"description": "Get the story with the slug 'note-01-entering-the-war'",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"url": "/api/story/note-02-la-formation-dun-consensus-memoriel",
"description": "Get the story with the slug 'note-02-la-formation-dun-consensus-memoriel'"
"description": "Get the story with the slug 'note-02-la-formation-dun-consensus-memoriel'",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"url": "/api/document/?q=castle&filters={%22data__type%22:%22place%22}",
"description": "Get all documents/places that contain the word 'castle'"
"url": "/api/document/?q=castle&filters={\"data__type\":\"place\"}",
"description": "Get all documents/places that contain the word 'castle'",
"hash": "b08398cbb947ab8b912734b08249eb8291d56e23b0e82fc91f839b74be6b10f2"
},
{
"url": "/api/tag/?filters={\"category\":\"keyword\"}",
"description": "Get all available tags",
"hash": "c0c2b8699dc9634674990556fc872afa922e6244062764c3390dd49ff8af6ae5"
},
{
"url": "/api/story/note-05-theme-02/?parser=yaml",
"description": "get the note content with a reference section",
"hash": "2f176b99c2924fc4acac5f511532682a85e719c6b10cdd245a816038d72640d7"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"short_url": "dGBHZ5G",
"date": null,
"date_created": "2024-05-17T08:51:14.285141Z",
"date_last_modified": "2024-05-17T14:36:57.250324Z",
"date_last_modified": "2024-08-09T09:07:31.828242Z",
"status": "public",
"covers": [],
"authors": [],
Expand Down Expand Up @@ -42,7 +42,7 @@
"overlay": "",
"backgroundColor": "#ddd"
},
"count_modules": 3
"count_modules": 4
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"count": 3,
"count": 4,
"next": null,
"previous": null,
"results": [
Expand All @@ -9,7 +9,7 @@
"short_url": "P3ru6Qp",
"date": null,
"date_created": "2024-05-17T08:44:34.373782Z",
"date_last_modified": "2024-05-17T14:33:34.431054Z",
"date_last_modified": "2024-08-09T12:39:22.547226Z",
"status": "public",
"covers": [],
"authors": [],
Expand All @@ -33,6 +33,10 @@
"abstract": {
"fr_FR": ""
},
"chapters": [
14,
15
],
"background": {
"bbox": [],
"overlay": "",
Expand All @@ -46,7 +50,7 @@
"short_url": "7XziHSn",
"date": null,
"date_created": "2024-05-17T08:45:18.263716Z",
"date_last_modified": "2024-05-17T14:33:21.192580Z",
"date_last_modified": "2024-08-09T10:39:16.355032Z",
"status": "public",
"covers": [],
"authors": [],
Expand Down Expand Up @@ -76,7 +80,8 @@
},
"chapters": [
4,
6
6,
13
],
"background": {
"bbox": [],
Expand Down Expand Up @@ -137,6 +142,47 @@
"backgroundColor": "#ddd"
}
}
},
{
"id": 16,
"slug": "theme-03-battles-fr",
"short_url": "D2MRxoo",
"date": null,
"date_created": "2024-08-09T12:51:32.152178Z",
"date_last_modified": "2024-08-09T12:51:40.078185Z",
"status": "public",
"covers": [],
"authors": [],
"tags": [
{
"id": 1,
"category": "publishing",
"slug": "theme",
"name": "theme",
"status": "public",
"data": {
"name": "theme"
}
}
],
"data": {
"color": "",
"title": {
"de_DE": "Theme 03 - Battles DE",
"en_GB": "Theme 03 - Battles EN",
"fr_FR": "Theme 03 - Battles FR"
},
"abstract": {
"de_DE": "The Battle of the Bulge: December 1944 DE",
"en_GB": "The Battle of the Bulge: December 1944 EN",
"fr_FR": "The Battle of the Bulge: December 1944 FR"
},
"background": {
"bbox": [],
"overlay": "",
"backgroundColor": "#ddd"
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,4 @@
"data": {}
}
]
}
}
Loading

0 comments on commit 2d71888

Please sign in to comment.