Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Veracity integration and Yodie+Crees bugfixing #11

Open
wants to merge 9 commits into
base: sheffield-service-integration
Choose a base branch
from

Conversation

rowasc
Copy link
Collaborator

@rowasc rowasc commented Sep 24, 2018

  • Integrate veracity service
  • YODIE bugfix to avoid the "double wrapping" of the yodie response in a json array
  • CREES bugfix: avoid sending only the first character of the $text, instead send the full post text (from the field the user selected)

note -

after this PR is approved, I'll send another one with sheffield-service-integration to master since I was working off this branch and sheffield-service-integration was already reviewed by Will

@rowasc rowasc changed the base branch from master to sheffield-service-integration September 24, 2018 16:59
{
$tags = [];
$json = json_decode($response->getBody(), true);
switch($json['rumour_label']) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eh so this is really gross but since we don't receive the names we want to use for categories, I had to map the
rumor_label : true => Rumor
rumor_label : false => Not a rumor
rumor_label : 'unverified' => 'Unverified'
I think maybe a cleaner approach might be to "stringify" the rumour_label to ensure we can just do a map and return ir ['false' => "Not a rumor" , 'true' => "Rumor" , 'unverified' => "Unverified"]




VERACITY_API_URL=<full_url_of_actionability_api>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops change to <full_url_of_veracity_api> for clarity

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.

1 participant