tonyfujs / mdlibtoddh

Other
1 stars 0 forks source link

Add citation link #109

Open alpaziz opened 5 years ago

alpaziz commented 5 years ago

This will allow us to populate the View publications related to this study (field_view_publications_related) field for Microdata Datasets.

Will need to first check whether or not a dataset has citations; just append related-publications to the resource URL (e.g https://microdata.worldbank.org/index.php/catalog/1137/related-publications).

if(link leads to 404){
 No citations
} else {
 Citations present
}

FYI: @cmachingauta

cmachingauta commented 5 years ago

@alpaziz thank you. Looks like that would work!

cmachingauta commented 5 years ago

use the below format to use this field in APIs

"field_view_publications_related": { "und": [{ "url" : "https://www.google.com" }] }, Please note, since the field used URL type, use the "url" parameter instead of "value" parameter.

alpaziz commented 5 years ago

Hey @cmachingauta ,

I believe we need the Microdata API to return a field which will be TRUEor FALSE depending if citations are present. Currently when I add the /related-publications to the end of a Microdata dataset page, the link doesn't throw an error (e.g https://microdata.worldbank.org/index.php/catalog/1/related-publications )