-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: sheffield-service-integration
Are you sure you want to change the base?
Conversation
app/Jobs/RunVeracityService.php
Outdated
{ | ||
$tags = []; | ||
$json = json_decode($response->getBody(), true); | ||
switch($json['rumour_label']) { |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
…s with categories, including Veracity scores or not
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