Skip to content

Commit

Permalink
Add last published to pages endpoint and simplify depth field (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood authored Nov 12, 2024
1 parent bfb0833 commit f563306
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 36 deletions.
14 changes: 9 additions & 5 deletions etna/api/tests/expected_results/article.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/article_index/article/",
"depth": 4,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 12,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 4
"twitter_og_image": null
},
"title": "article",
"global_alert": null,
Expand Down Expand Up @@ -331,6 +331,7 @@
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": true
}
],
Expand Down Expand Up @@ -358,7 +359,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
],
"time_periods": [
Expand All @@ -384,7 +386,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
},
{
"id": POSTWAR_ID,
Expand All @@ -408,7 +411,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
]
}
7 changes: 5 additions & 2 deletions etna/api/tests/expected_results/article_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/article_index/",
"depth": 3,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 11,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 3
"twitter_og_image": null
},
"title": "article_index",
"global_alert": null,
Expand Down Expand Up @@ -92,6 +92,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
},
"featured_pages": [
Expand Down Expand Up @@ -124,6 +125,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
},
{
Expand All @@ -149,6 +151,7 @@
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": true
}
]
Expand Down
7 changes: 5 additions & 2 deletions etna/api/tests/expected_results/arts.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/arts/",
"depth": 3,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 2,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 3
"twitter_og_image": null
},
"title": "arts",
"hero_image_caption": "<p>Hero image caption</p>",
Expand Down Expand Up @@ -139,6 +139,7 @@
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": true
},
{
Expand All @@ -164,6 +165,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
}
],
Expand Down Expand Up @@ -191,6 +193,7 @@
"height": 68
}
},
"last_published_at": "2000-01-03T00:00:00Z",
"highlight_image_count": 1
}
]
Expand Down
5 changes: 3 additions & 2 deletions etna/api/tests/expected_results/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/people/author/",
"depth": 4,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 10,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 4
"twitter_og_image": null
},
"title": "author",
"global_alert": {
Expand Down Expand Up @@ -141,6 +141,7 @@
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": true
}
],
Expand Down
7 changes: 5 additions & 2 deletions etna/api/tests/expected_results/early_modern.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/early_modern/",
"depth": 3,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 4,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 3
"twitter_og_image": null
},
"title": "early_modern",
"hero_image_caption": "<p>Hero image caption</p>",
Expand Down Expand Up @@ -138,6 +138,7 @@
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": true
},
{
Expand All @@ -163,6 +164,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
}
],
Expand Down Expand Up @@ -190,6 +192,7 @@
"height": 68
}
},
"last_published_at": "2000-01-03T00:00:00Z",
"highlight_image_count": 1
}
],
Expand Down
12 changes: 8 additions & 4 deletions etna/api/tests/expected_results/focused_article.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-02T00:00:00Z",
"url": "/article_index/focused_article/",
"depth": 4,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 14,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 4
"twitter_og_image": null
},
"title": "focused_article",
"global_alert": null,
Expand Down Expand Up @@ -144,6 +144,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
}
],
Expand Down Expand Up @@ -171,7 +172,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
],
"time_periods": [
Expand All @@ -197,7 +199,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
],
"authors": [
Expand All @@ -224,6 +227,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"role": "Test Author",
"image": {
"id": 9,
Expand Down
11 changes: 7 additions & 4 deletions etna/api/tests/expected_results/highlight_gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"privacy": "public",
"last_published_at": "2000-01-03T00:00:00Z",
"url": "/arts/highlight_gallery/",
"depth": 4,
"teaser_text": "Teaser text",
"teaser_image": {
"id": 16,
Expand Down Expand Up @@ -58,8 +59,7 @@
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null,
"depth": 4
"twitter_og_image": null
},
"title": "highlight_gallery",
"global_alert": null,
Expand Down Expand Up @@ -94,6 +94,7 @@
"height": 68
}
},
"last_published_at": "2000-01-01T00:00:00Z",
"is_newly_published": false
},
"highlights": [
Expand Down Expand Up @@ -175,7 +176,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
],
"time_periods": [
Expand All @@ -201,7 +203,8 @@
"width": 100,
"height": 68
}
}
},
"last_published_at": "2000-01-01T00:00:00Z"
}
]
}
Loading

0 comments on commit f563306

Please sign in to comment.