abartov / bybeconv

Project Ben-Yehuda's content management system.
https://benyehuda.org/
Other
10 stars 5 forks source link

Renamed PeopleAPI to AuthoritiesAPI #371

Closed damisul closed 3 weeks ago

damisul commented 3 weeks ago

Updated it to support CorporateBodies.

Previously it returned people as:

"metadata": {
    "name": "שלמה שפאן",
    "sort_name": "שפאן, שלמה",
    "birth_year": "1898",
    "death_year": "1962",
    "gender": "male",
    "intellectual_property": "permission_for_selected",
    "period": "revival",
    "other_designations": "שלמה שְׁפַּאן",
 <...>
}

Now for people it will return

"metadata": {
    "name": "שלמה שפאן",
    "sort_name": "שפאן, שלמה",
    "other_designations": "שלמה שְׁפַּאן",
    "intellectual_property": "permission_for_selected",
    "person": {
      "gender": "male",
      "period": "revival",
      "birth_year": "1898",
      "death_year": "1962"
    },
<...>
}

And for CorporateBody it will look like:

"metadata": {
    "name": "Test Corporate Body 1",
    "sort_name": "Test corporate Body 1",
    "other_designations": "",
    "intellectual_property": "orphan",
    "corporate_body": {
      "location": "Tallin",
      "inception_year": 1932,
      "dissolution_year": null
    },
<...>
  }