Skip to content

Commit 61be08a

Browse files
author
Paweł Marynowski
committed
feat(services): add raw response and qualifiers
1 parent 8e85db3 commit 61be08a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/services/wikidata.service.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const wdService = function ($http, $q) {
113113

114114
function simplifyEntity(entity) {
115115
return {
116+
_raw: entity,
116117
id: entity.id,
117118
labels: simplifyLabels(entity.labels),
118119
aliases: simplifyAliases(entity.aliases),
@@ -131,7 +132,8 @@ const wdService = function ($http, $q) {
131132
return {
132133
value_type: snak.datatype,
133134
value_id: snak.datavalue.value.id,
134-
value: snak.datavalue.value
135+
value: snak.datavalue.value,
136+
qualifiers: claim.qualifiers
135137
};
136138
}
137139

@@ -170,7 +172,8 @@ const wdService = function ($http, $q) {
170172
property: labels[key],
171173
values: values.map(value => labels[value.value_id] ?
172174
angular.extend(value, { value: labels[value.value_id] }) :
173-
value)
175+
value),
176+
qualifiers: entity.qualifiers
174177
}));
175178
});
176179
return entities;

0 commit comments

Comments
 (0)