⚙︎ SectionPageService

Message to provide parameters when requesting data for a section page, currently only the path of the page. Correct paths have a leading and a trailing slash, like /nachrichten/unterhaltung/ The homepage has the path /.

message GetSectionPageRequest {
  // valid section_path, with leading and trailing slash
  string section_path = 1;

  // use to page through sections. If unspecified, it will default to `1`.
  // Paging is 1-based (1 is the first page, there is no page `0`)
  //
  // Due to underlying mechanisms and seo requirements, page-size is fixed at 30
  // The service may return fewer than this value.
  int32 page = 2;
}

[~]

Response message when requesting data for a section page. Responds with NOT_FOUND if an unknown path is requested, or the path is incorrect.

message GetSectionPageResponse {
stroeer.page.section.v1.SectionPage section_page = 1;

 // Total number of pages in this `section_path`
int32 total_pages = 2;

PaginationType pagination_type = 3;

 enum PaginationType {
   // Not specified.
   PAGINATION_TYPE_UNSPECIFIED = 0;

   // The default pagination type.
   FIXED_BLOCK = 1;

   // Pagination type for Evergreen-Ressorts.
   GHOST_BLOCK = 2;
 }
}

[~]

Service to fetch all data needed to render a section page, like the homepage or "/politik/" [~]

Status/Error scenario's

scenario: found

descriptionall data for the section page was found
gRPC statusOK (0)
gRPC error payloadnone
HTTP status200 (OK)
cacheableyes

scenario: section path is empty

descriptionclient did not provide a section path
gRPC statusINVALID_ARGUMENT (3)
gRPC error payloadgoogle.rpc.Bad
HTTP status400 (BAD REQUEST)
cacheableyes

scenario: section path is invalid

descriptionclient provided an invalid section path
gRPC statusINVALID_ARGUMENT (3)
gRPC error payloadgoogle.rpc.Bad
HTTP status400 (BAD REQUEST)
cacheableyes

scenario: section path is unknown

descriptionclient provided an unknown section path
gRPC statusNOT_FOUND (5)
gRPC error payloadnone
HTTP status404 (NOT FOUND)
cacheableyes

scenario partial section data

descriptionartificial internal error processing parts of this section (no data but valid section)
gRPC statusINTERNAL (13)
gRPC error payloadnone
HTTP status500 (INTERNAL SERVER ERROR)
cacheableno

scenario internal

descriptioninternal error processing the section
gRPC statusINTERNAL (13)
gRPC error payloadnone
HTTP status500 (INTERNAL SERVER ERROR)
cacheableno

scenario timeout

descriptiontimeout loading and processing the section
gRPC statusDEADLINE_EXCEEDED (4)
gRPC error payloadnone
HTTP status504 (GATEWAY TIMEOUT)
cacheableno

Scenarios about incomplete section data needs to be defined. No section data results in an internal server error while incomplete section data might be returned. [~]

[~]