co-inform / gateway-api

The API for the gateway
1 stars 0 forks source link

`/twitter/evaluate` should collect enough information to store in DB #10

Open rdenaux opened 4 years ago

rdenaux commented 4 years ago

To help with refining the definition of the /twitter/evaluate endpoint, this issue describes a test case where a user submits an accuracy rating for a tweet. It also describes the desired outcome, namely a corresponding call to the content collector api.

Context

A co-inform plugin user has internal UUID cf40ced2-7cc8-98a3-1fb0-02c96d781626. The user has logged into the plugin and for this tweet fills out the accuracy rating popup with the following data:

Desired outcome

The GW should issue the following call to content collector api, corresponding to the data the user entered.

The GW calls the /user/accuracy-review with a POST and the following content object

{
  "context": "http://schema.org",
  "type": "CoinformUserReview",
  "author": {
    "context": "http://coinform.eu",
    "type": "CoinformUser",
    "url": "http://coinform.eu/users/cf40ced2-7cc8-98a3-1fb0-02c96d781626",
    "identifier": "cf40ced2-7cc8-98a3-1fb0-02c96d781626"
  },
  "text": "Some comment about why the tweet is accurate and the linked document shows that",
  "name": "accurate with considerations",
  "supportingItem": [
    {
      "context": "http://schema.org",
      "type": "WebSite",
      "url": "https://www.snopes.com/fact-check/reuters-or-wrong/"
    }
  ],
  "reviewAspect": "accuracy",
  "reviewRating": {
    "context": "http://coinform.eu",
    "type": "CoinformAccuracyRating",
    "ratingValue": "accurate with considerations",
    "reviewAspect": "accuracy"
  },
  "itemReviewed": {
    "context": "http://coinform.eu",
    "type": "Tweet",
    "url": "https://twitter.com/realDonaldTrump/status/1181172459325800448"
    "identifier": "1181172459325800448"
  },
  "requestFactCheck": false
}

Issue

When the user clicks on the submit button, the FE calls the /twitter/evaluate via POST. Please verify that the data submitted by the FE is sufficient to allow the GW implementation to convert it to the format required by the content collector.

aleixac commented 4 years ago

For this endpoint I think that the only missing value posted from the FE right now would be the "requestFactCheck" one. For the moment you can accept it as not mandatory and default=false, and latter on, we can introduce it in the FE interface and start using it.