REST API

The following REST endpoints are available:

/api/verify_tweet/tweet_id

Gets the veracity classification and stance related to a particular tweet by providing the tweet_id.

The following JSON object is returned:

                
                {
                    "tweet_id": "1234567890",
                    "date_posted": "2019-05-01T15:01:01Z",
                    "veracity": 0,
                    "support": 0.0,
                    "deny": 0.0,
                    "question": 0.0,
                    "comment": 0.0,
                    "support_votes": 0.0,
                    "deny_votes": 0.0,
                    "question_votes": 0.0,
                    "comment_votes": 0.0
                }
                
            

Description of each returned value:

  • tweet_id - The id of the tweet.
  • date_posted - The date the tweet is created.
  • veracity - Veracity classification provided by our algorithm. Value range between +1 (true), 0 (unverified), and -1 (false)
  • support, deny, question, and comment - Stance classification provided by our algorithm. Values are normalised.
  • support_votes, deny_votes, question_votes, comment_votes - The number of total user votes for each stance category.

/api/vote_veracity

Vote for the veracity of a particular tweet. User must be authenticated.

The input requires the tweet_id and veracity fields. The format of the JSON input is as follows:

                
                    {
                        "tweet_id": "1234567890",
                        "veracity": 1.0,
                        "evidence": "String containing evidence for veracity score vote."
                    }
                
            

/api/vote_stance

Vote for the stance of a particular tweet. User must be authenticated.

The input requires the tweet_id field. One of the support, deny, question , or comment fields must be set to true. The format of the JSON input is as follows:

                
                    {
                        "tweet_id": "1234567890",
                        "support": true
                    }
                
            

it is also valid to provide all the options but the support/deny/question/comment fields are mutually exclusive (i.e. only one field may be true):

                
                    {
                        "tweet_id": "1234567890",
                        "support": true,
                        "deny": false,
                        "question": false,
                        "comment": false
                    }