Skip to content

Conversation

@mmiermans
Copy link
Contributor

@mmiermans mmiermans commented Jul 26, 2023

Goal

Add time_to_read and timeToRead respectively to the old and new recommendation endpoint.

Implementation Decisions

References

JIRA ticket:

QA

As part of the QA steps in #908 we simulated a Parser outage, and checked that recommendations continue to be returned successfully. When firefox-api-proxy is deployed to Pocket-Dev it requests production recommendations, so we can only QA the scenario where the Parser is available for this PR.

/v3/firefox/global-recs en-GB

  • Most recommendations have time_to_read with an integer value
  • time_to_read is missing for a small number of the recommendations

/desktop/v1/recommendations fr-FR

  • Most recommendations have time_to_read with an integer value
  • time_to_read is missing for a small number of the recommendations

@mmiermans mmiermans requested review from a team as code owners July 26, 2023 18:42
@mmiermans mmiermans requested review from Herraj, ScottDowne, katerinachinnappan and ml8 and removed request for katerinachinnappan and ml8 July 26, 2023 18:42
CH,
AT,
BE,
]
Copy link
Contributor Author

@mmiermans mmiermans Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to time-to-read, but we just happened to notice that #55 accidentally re-introduced this enum. The generated code was not impacted by this, so requests from unsupported regions such as NL continue to work.

Comment on lines +155 to +157
timeToRead:
type: integer
description: Article read time in minutes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ScottDowne Just to confirm, timeToRead (camel-case) is supported by Firefox when hitting the new api, right?

Seems like that's the case looking at the code: https://searchfox.org/mozilla-central/source/browser/components/pocket/content/pktApi.sys.mjs#868

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct.

Copy link
Contributor

@Herraj Herraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

return recommendationWithoutTimeToRead;
}
};

This comment was marked as resolved.

Comment on lines +155 to +157
timeToRead:
type: integer
description: Article read time in minutes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct.

@mmiermans mmiermans merged commit 33c7e8a into main Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants