Page MenuHomePhabricator

Add "Get Integrity" API endpoint to Content Integrity service
Closed, ResolvedPublic8 Estimated Story Points

Description

We need to create an API endpoint that will return integrity of the article by article ID, so that we can know if something is breaking news or not.

Acceptance criteria

  • Expose an API endpoint:
    • Input parameters:
      • Article ID number
      • Project ID string
      • Version ID number
      • Date Modified timestamp
      • List of Article Templates strings
      • List of Article Categories string
    • Output parameters:
      • Article ID number
      • Project ID string
      • Version ID number
      • Is Breaking News boolean
      • Unique Editors / 48h number
      • Edit Count / 48h number
      • Date Created timestamp
      • Date Namespace Moved timestamp
  • Is Breaking News calculated from the data following the algorithm in ERD, using env variables:
    • BREAKING_NEWS_TEMPLATES - list of templates for the algorithm
    • BREAKING_NEWS_CATEGORIES - list of categories for the algirithm
    • BREAKING_NEWS_CREATED_HOURS - number of hours after the article was created it is still considered breaking news
    • BREAKING_NEWS_MOVED_HOURS - number of hours after article moved namespaces it is still considered breaking news
    • BREAKING_NEWS_UNIQUE_EDITORS - number of unique editors something is consider to be breaking news

ToDo

  • add proto file for the content integrity service
  • create the handler for the service
  • add unit tests
  • add environment variables

Event Timeline

Felixejofre set the point value for this task to 8.Apr 12 2023, 2:03 PM