Last active
December 18, 2016 15:36
-
-
Save Libisch/e4bb04229d7e30703a0dd9206684888d to your computer and use it in GitHub Desktop.
New API response for Places ("Paris", including 1 example of 15 results)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"items": "1-15 of 44", // If possible - show items count out of total | |
"total": "44", // Current: ["hits"]["total"] | |
"results": [ // Current: Second ["hits"]["hits"] | |
{ | |
"collection_type": "places", // Current: ["hits"]["hits"][x]["_type"] | |
"id": "72312", // ? Ask Benny if needed | |
"title_en": "Paris", // Current: ["hits"]["hits"][x]["_source"]["Header"]["En"] | |
"title_he": "פריס", // Current: ["hits"]["hits"][x]["_source"]["Header"]["He"] | |
"text_en": "In 582, the date of the first documentary evidence of the presence of Jews in Paris, there was already a community with a synagogue. In 614 or 615, the sixth council of Paris decided that Jews who held public office, and their families, must convert to Christianity. From the 12th century on there was a Jewish quarter. According to one of the sources of Joseph ha- Kohen's Emek ha-Bakha, Paris Jews owned about half the land in Paris and the vicinity. They employed many Christian servants and the objects they took in pledge included even church vessels.", // (...) Current: ["hits"]["hits"][x]["_source"]["UnitText1"]["En"] | |
"text_he": "פריס\n\nבירת צרפת.\n\nעדות ראשונה על קיום יהודים בפריס נשתמרה מסוף המאה ה-6 וכבר אז הייתה במקום קהילה יהודית ולה בית-כנסת משלה. הקהילה קיימה יחסי שכנות תקינים עם שאר תושבי העיר.\n\nהאיסור על קבלת יהודים למשרה ציבורית, שנקבע בקונסיל השישי בפריס (614 או 615), מעיד על מעמדם הרם בחברה.\n\nמתחילת המאה ה-12 היה בעיר רובע מיוחד ליהודים, ולדברי אחד המקורות של יוסף הכהן, \"ספר הבכא\", היו בבעלות יהודית כמחצית האדמות בפריס וסביבתה. היו ליהודים הרבה עבדים ושפחות, ובין הפקדונות שהיו לוקחים להבטחת ההלוואות היו גם כלי פולחן נוצריים.", // (...) Current: ["hits"]["hits"][x]["_source"]["UnitText1"]["He"] | |
"main_image_url": "https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", // Current: ["hits"]["hits"][x]["_source"]["main_image_url"] | |
"main_image_thumbnail_url": "https://storage.googleapis.com/bhs-thumbnails/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", // Current: ["hits"]["hits"][x]["_source"]["thumbnail_url"] | |
"more_images_urls": [ // Current: ["hits"]["hits"][x]["_source"]["Pictures"] | |
"https://storage.googleapis.com/bhs-flat-pics/00E201C7-BCD4-404A-B551-0D5B1DE8DEE3.jpg", // Current: "PictureId": "00E201C7-BCD4-404A-B551-0D5B1DE8DEE3" | |
"https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", // Current: "PictureId": "5A8D1CC0-3D01-4AB0-B515-4B27873703D8" | |
"https://storage.googleapis.com/bhs-flat-pics/212BE375-83E7-440A-9C5A-AAE09BEB89B1.jpg", // Current: "PictureId": "212BE375-83E7-440A-9C5A-AAE09BEB89B1" | |
"https://storage.googleapis.com/bhs-flat-pics/29202878-0C3C-4DE6-BE00-B2A708693B2D.jpg", // Current: "PictureId": "29202878-0C3C-4DE6-BE00-B2A708693B2D" | |
"https://storage.googleapis.com/bhs-flat-pics/5687F54F-66DC-4BCB-A6CD-FB9AEAD4D00A.jpg" // Current: "PictureId": "5687F54F-66DC-4BCB-A6CD-FB9AEAD4D00A" | |
], | |
"related_items_urls": [ // Current: ["hits"]["hits"][x]["_source"]["related"] | |
"http://dbs.bh.org.il/image_jewish-wedding-paris-france-1984-19652", | |
"http://dbs.bh.org.il/image_ancient-jewish-school-engraving-by-j-lebas-paris-1722", | |
"http://dbs.bh.org.il/image_rabbi-menaem-rubinstein-on-a-visit-to-paris-france-1930s" | |
], | |
"last_updated": "2016-01-07T09:30:00", // Current: ["hits"]["hits"][x]["_source"]["UpdateDate"] | |
"bibiliography_en": null, // Current: ["hits"]["hits"][x]["_source"]["Bibiliography"]["En"] | |
"bibiliography_he": "אנציקלופדיה יודאיקה \nמכון קונגרס יהודי עולמי", // Current: ["hits"]["hits"][x]["_source"]["Bibiliography"]["He"] | |
"location_type_en": "City", // Current: ["hits"]["hits"][x]["_source"]["PlaceTypeDesc"]["En"] | |
"location_type_he": "עיר", // Current: ["hits"]["hits"][x]["_source"]["PlaceTypeDesc"]["He"] | |
"location_parent_type_en": "Country", // Current: ["hits"]["hits"][x]["_source"]["PlaceParentTypeCodeDesc"]["En"] | |
"location_parent_type_he": "מדינה", // Current: ["hits"]["hits"][x]["_source"]["PlaceParentTypeCodeDesc"]["He"] | |
"slug_en": "place_paris", // Current: ["hits"]["hits"][x]["_source"]["Slus"]["En"] | |
"slug_he": "מקום_פריס" // Current: ["hits"]["hits"][x]["_source"]["Slus"]["He"] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"results_range": "1-15 of 44", | |
"next_results_uri": [ | |
"/v1/search?collection=places&from_=15&q=paris", | |
"/v1/search?collection=places&from_=30&q=paris" | |
], | |
"total": "44", | |
"results": [ | |
{ | |
"collection_type": "places", | |
"id": "72312", | |
"title_en": "Paris", | |
"title_he": "פריס", | |
"text_en": "In 582, the date of the first documentary evidence of the presence of Jews in Paris, there was already a community with a synagogue. In 614 or 615, the sixth council of Paris decided that Jews who held public office, and their families, must convert to Christianity. From the 12th century on there was a Jewish quarter. According to one of the sources of Joseph ha- Kohen's Emek ha-Bakha, Paris Jews owned about half the land in Paris and the vicinity. They employed many Christian servants and the objects they took in pledge included even church vessels.", | |
"text_he": "פריס\n\nבירת צרפת.\n\nעדות ראשונה על קיום יהודים בפריס נשתמרה מסוף המאה ה-6 וכבר אז הייתה במקום קהילה יהודית ולה בית-כנסת משלה. הקהילה קיימה יחסי שכנות תקינים עם שאר תושבי העיר.\n\nהאיסור על קבלת יהודים למשרה ציבורית, שנקבע בקונסיל השישי בפריס (614 או 615), מעיד על מעמדם הרם בחברה.\n\nמתחילת המאה ה-12 היה בעיר רובע מיוחד ליהודים, ולדברי אחד המקורות של יוסף הכהן, \"ספר הבכא\", היו בבעלות יהודית כמחצית האדמות בפריס וסביבתה. היו ליהודים הרבה עבדים ושפחות, ובין הפקדונות שהיו לוקחים להבטחת ההלוואות היו גם כלי פולחן נוצריים.", | |
"main_image_url": "https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", | |
"main_image_thumbnail_url": "https://storage.googleapis.com/bhs-thumbnails/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", | |
"more_images_urls": [ | |
"https://storage.googleapis.com/bhs-flat-pics/00E201C7-BCD4-404A-B551-0D5B1DE8DEE3.jpg", | |
"https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", | |
"https://storage.googleapis.com/bhs-flat-pics/212BE375-83E7-440A-9C5A-AAE09BEB89B1.jpg", | |
"https://storage.googleapis.com/bhs-flat-pics/29202878-0C3C-4DE6-BE00-B2A708693B2D.jpg", | |
"https://storage.googleapis.com/bhs-flat-pics/5687F54F-66DC-4BCB-A6CD-FB9AEAD4D00A.jpg" | |
], | |
"related": { | |
"images": [ | |
"/v1/image_jewish-wedding-paris-france-1984-19652", | |
"/v1/image_jewish-wedding-paris-france-1984-19652", | |
"/v1/image_jewish-wedding-paris-france-1984-19652" | |
], | |
"family_names": null, | |
"places": null, | |
"luminaries": null | |
}, | |
"last_updated": "2016-01-07T09:30:00", | |
"bibiliography_en": null, | |
"bibiliography_he": "אנציקלופדיה יודאיקה \nמכון קונגרס יהודי עולמי", | |
"location_type_en": "City", | |
"location_type_he": "עיר", | |
"location_parent_type_en": "Country", | |
"location_parent_type_he": "מדינה", | |
"slug_en": "place_paris", | |
"slug_he": "מקום_פריס" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"results_range": "1-15 of 44", /* If possible - show items count out of total */ | |
"next_results_uri": [ /* Provide URIs for next results */ | |
"/v1/search?collection=places&from_=15&q=paris", | |
"/v1/search?collection=places&from_=30&q=paris" | |
], | |
"total": "44", /* Current: ["hits"]["total"] */ | |
"results": [ /* Current: Second ["hits"]["hits"] */ | |
{ | |
"collection_type": "places", /* Current: ["hits"]["hits"][x]["_type"] */ | |
"id": "72312", /* ? Ask Benny if needed */ | |
"title_en": "Paris", /* Current: ["hits"]["hits"][x]["_source"]["Header"]["En"] */ | |
"title_he": "פריס", /* Current: ["hits"]["hits"][x]["_source"]["Header"]["He"] */ | |
"text_en": "In 582, the date of the first documentary evidence of the presence of Jews in Paris, there was already a community with a synagogue. In 614 or 615, the sixth council of Paris decided that Jews who held public office, and their families, must convert to Christianity. From the 12th century on there was a Jewish quarter. According to one of the sources of Joseph ha- Kohen's Emek ha-Bakha, Paris Jews owned about half the land in Paris and the vicinity. They employed many Christian servants and the objects they took in pledge included even church vessels.", /* (...) Current: ["hits"]["hits"][x]["_source"]["UnitText1"]["En"] */ | |
"text_he": "פריס\n\nבירת צרפת.\n\nעדות ראשונה על קיום יהודים בפריס נשתמרה מסוף המאה ה-6 וכבר אז הייתה במקום קהילה יהודית ולה בית-כנסת משלה. הקהילה קיימה יחסי שכנות תקינים עם שאר תושבי העיר.\n\nהאיסור על קבלת יהודים למשרה ציבורית, שנקבע בקונסיל השישי בפריס (614 או 615), מעיד על מעמדם הרם בחברה.\n\nמתחילת המאה ה-12 היה בעיר רובע מיוחד ליהודים, ולדברי אחד המקורות של יוסף הכהן, \"ספר הבכא\", היו בבעלות יהודית כמחצית האדמות בפריס וסביבתה. היו ליהודים הרבה עבדים ושפחות, ובין הפקדונות שהיו לוקחים להבטחת ההלוואות היו גם כלי פולחן נוצריים.", /* (...) Current: ["hits"]["hits"][x]["_source"]["UnitText1"]["He"] */ | |
"main_image_url": "https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", /* Current: ["hits"]["hits"][x]["_source"]["main_image_url"] */ | |
"main_image_thumbnail_url": "https://storage.googleapis.com/bhs-thumbnails/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", /* Current: ["hits"]["hits"][x]["_source"]["thumbnail_url"] */ | |
"more_images_urls": [ /* Current: ["hits"]["hits"][x]["_source"]["Pictures"] */ | |
"https://storage.googleapis.com/bhs-flat-pics/00E201C7-BCD4-404A-B551-0D5B1DE8DEE3.jpg", /* Current: "PictureId": "00E201C7-BCD4-404A-B551-0D5B1DE8DEE3" */ | |
"https://storage.googleapis.com/bhs-flat-pics/5A8D1CC0-3D01-4AB0-B515-4B27873703D8.jpg", /* Current: "PictureId": "5A8D1CC0-3D01-4AB0-B515-4B27873703D8" */ | |
"https://storage.googleapis.com/bhs-flat-pics/212BE375-83E7-440A-9C5A-AAE09BEB89B1.jpg", /* Current: "PictureId": "212BE375-83E7-440A-9C5A-AAE09BEB89B1" */ | |
"https://storage.googleapis.com/bhs-flat-pics/29202878-0C3C-4DE6-BE00-B2A708693B2D.jpg", /* Current: "PictureId": "29202878-0C3C-4DE6-BE00-B2A708693B2D" */ | |
"https://storage.googleapis.com/bhs-flat-pics/5687F54F-66DC-4BCB-A6CD-FB9AEAD4D00A.jpg" /* Current: "PictureId": "5687F54F-66DC-4BCB-A6CD-FB9AEAD4D00A" */ | |
], | |
"related": { /* Current: ["hits"]["hits"][x]["_source"]["related"] */ | |
"images": [ | |
"/v1/image_jewish-wedding-paris-france-1984-19652", | |
"/v1/image_jewish-wedding-paris-france-1984-19652", | |
"/v1/image_jewish-wedding-paris-france-1984-19652" | |
], | |
"family_names": null, | |
"places": null, | |
"luminaries": null | |
}, | |
"last_updated": "2016-01-07T09:30:00", /* Current: ["hits"]["hits"][x]["_source"]["UpdateDate"] */ | |
"bibiliography_en": null, /* Current: ["hits"]["hits"][x]["_source"]["Bibiliography"]["En"] */ | |
"bibiliography_he": "אנציקלופדיה יודאיקה \nמכון קונגרס יהודי עולמי", /* Current: ["hits"]["hits"][x]["_source"]["Bibiliography"]["He"] */ | |
"location_type_en": "City", /* Current: ["hits"]["hits"][x]["_source"]["PlaceTypeDesc"]["En"] */ | |
"location_type_he": "עיר", /* Current: ["hits"]["hits"][x]["_source"]["PlaceTypeDesc"]["He"] */ | |
"location_parent_type_en": "Country", /* Current: ["hits"]["hits"][x]["_source"]["PlaceParentTypeCodeDesc"]["En"] */ | |
"location_parent_type_he": "מדינה", /* Current: ["hits"]["hits"][x]["_source"]["PlaceParentTypeCodeDesc"]["He"] */ | |
"slug_en": "place_paris", /* Current: ["hits"]["hits"][x]["_source"]["Slus"]["En"] */ | |
"slug_he": "מקום_פריס" /* Current: ["hits"]["hits"][x]["_source"]["Slus"]["He"] */ | |
} | |
] | |
} |
Author
Libisch
commented
Dec 11, 2016
- Comments indicate current position and key names
- Languages could be separated if wanted
Nice!
- "items" is too verbose, better to have a "from" field
-"related_items_urls" should contain relative urls for the data (starting with '/v1/') and should be broken by type like we have it in the dbs today, so instead of an array of related, we get:
'related': {
'pictures': [...],
'family_name': [...],
'places': [...],
'luminaries': [...]
}
We should also add a "next_results" with the URI to use to get more results.
Regarding "location":
- Do you think it's better to condense all location keys?
- Is it possible to add a primary "location" that indicates both type and name of the place and it's parent? (e.g
"location": "Paris, France"
)
"location": {
"location_name": "Paris, France", /* ["title", "parent name"] */
"Location_type": "city"
"parent_location_type": "country"
}
For location we should use http://www.wikiwand.com/en/GeoJSON
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment