Open MichalOren opened 6 months ago
@atalyaalon
Today api haven't indication about pagination. Api receive only offset and limit.
To achieve this feature we need to add full pagination control to api request.
As well in this case we need bi direction pagination.
api params to add:
api response should include:
data: [] pagination :{ pageNumber: number; pageSize: number; totalPages: number; totalRecords: number; }
Hi @SejoB ,
I will be implementing this on the back-end. I have a question:
What should be the behavior when newsFlashId
parameter that you mentioned is provided? Is it mutually disjoint from pageNumber
and pageSize
?
Thanks, Ziv
Hi @SejoB ,
For the integration, I can output the new format only when pageNumber
is provided, and only on second step to remove the current output format completely.
What do you think?
Hi @SejoB , I will be implementing this on the back-end. I have a question: What should be the behavior when
newsFlashId
parameter that you mentioned is provided? Is it mutually disjoint frompageNumber
andpageSize
? Thanks, Ziv
@ziv17 from my understanding, when newsFlashId
parameter is provided together with and limit
(and optional pageNumber
and pageSize
), ideal behavior is sending news flashes that are chronologically before and after this newsflash (say if limit is 100, so we'll get 50 newsflashes before and 49 newsflashes after specific newsflash - or less if there are less). Meaning that to some extent newsFlashId
sets the offset in this case, and seems like these two parameters cannot co-exist.
@SejoB @ziv17 What do you think?
Hi @SejoB , For the integration, I can output the new format only when
pageNumber
is provided, and only on second step to remove the current output format completely. What do you think?
Sounds good to me
@ziv17 Just to make sure we're aligned with current functionality (that will either be changed or deprecated if we'll use newsFlashId
as a parameter):
Today when fetching specific news flash id, it's not a parameter but a part of the main URL for example:
https://www.anyway.co.il/api/news-flash/214463
And there is no option to fetch additional newsflashes using limit. We'll get the same response when using this URL as well: https://www.anyway.co.il/api/news-flash/214463?limit=100
Describe the bug There is a mismatch between the infographics screen and the news flash list on the right. The problem exists in several flows, therefore it is described in general terms.
To Reproduce https://anyway-infographics-staging.web.app/newsflash/184863
Expected behavior