Open GuyKh opened 6 months ago
Solves #118
Basically - changed the logic to the following:
e.g. for https://collections.yadvashem.org/en/names/14035251 call (step 2) to: https://yv360.yadvashem.org/api/Names/GetSingleFullDetails?id=1100850&lang=en&source=Page%20of%20Testimony
response is in the following format:
{ "details": [ { "tag": null, "id": "YSLN", "value": "Epsztein", "url": "" }, { "tag": null, "id": "YSLN", "value": "Epshtein", "url": "" }, { "tag": null, "id": "YSFN", "value": "Abram", "url": "" }, { "tag": null, "id": "YSFN", "value": "Avraham", "url": "" }, { "tag": null, "id": "GENDER", "value": "Male", "url": "" },...
Then, convert the details list to an object by using a id to field_name mapping, with value from value. Then parse it.
details
id
value
Also - since they may be duplicates, take the first value.
Bonus: Refactor addEventData to a common class.
addEventData
Other things to add (probably in a different PR) - the ability to fetch an image.
Solves #118
Basically - changed the logic to the following:
e.g. for https://collections.yadvashem.org/en/names/14035251 call (step 2) to: https://yv360.yadvashem.org/api/Names/GetSingleFullDetails?id=1100850&lang=en&source=Page%20of%20Testimony
response is in the following format:
Then, convert the
details
list to an object by using aid
to field_name mapping, with value fromvalue
. Then parse it.Also - since they may be duplicates, take the first value.
Bonus: Refactor
addEventData
to a common class.Other things to add (probably in a different PR) - the ability to fetch an image.