What has to be added to the API?
@f.dmello please comment here what you need for a clear separation of the front end and back end through the API.
A list so far:
-
The API should get an endpoint facets
which will return information like this, so that it has not to be known by the frontend:
AVAILABLE_FACETS = ['txt_knowsAbout', 'txt_knowsLanguage', 'txt_nationality', 'txt_jobTitle', 'txt_contributor',
'txt_keywords',
'txt_memberOf', 'txt_parentOrganization', 'id_provider', 'id_includedInDataCatalog']
facet_intervals = ["[*,1800)","[1800,1900)","[1900,1950)"]
facet_intervals.extend("[%d,%d)" %(x,x+10) for x in range(1950,2010,10))
facet_intervals.extend("[%d,%d)" %(x,x+2) for x in range(2010,2030,2))
FACET_FIELDS = {
'Spatial': [ 'txt_keywords', 'txt_provider', 'txt_variableMeasured', 'type'],
'Person': [ 'txt_memberOf', 'txt_knowsLanguage', 'txt_jobTitle', 'txt_knowsAbout', 'txt_affiliation', 'txt_provider'],
'Organization': [ 'txt_memberOf', 'txt_provider'],
'Dataset': [ 'txt_keywords', 'txt_provider', 'txt_variableMeasured'],
'CreativeWork': ['txt_keywords', 'txt_provider', 'txt_contributor'],
'Course': ['txt_keywords', 'txt_provider', 'txt_author', 'txt_educationalCredentialAwarded'],
'Vehicle': ['txt_keywords', 'txt_provider', 'txt_vehicleSpecialUsage'],
'ResearchProject': [ 'txt_keywords', 'txt_provider', 'txt_areaServed'],
}
FACET_INTERVALS = {
'Dataset': [ 'n_startYear', 'n_endYear'],
'Course': [ 'n_startYear', 'n_endYear'],
'Spatial': [ 'n_startYear', 'n_endYear'],
}
-
an endpoint returning the document_types/categories
i.e 'expert, software, organizations` @f.dmello You also wanted to recieve the icons which should be displayed for these... here I am undecided, because the only change which will happen down the road is that a new category might be added. So in my view for now this could stay in the front end. -
An API endpoint returning the uplifted json-ld