in connectors/sources/dropbox.py [0:0]
def _adapt_dropbox_doc_to_es_doc(self, response):
is_file = response.get(".tag") == "file"
if is_file and response.get("name").split(".")[-1] == PAPER:
timestamp = response.get("client_modified")
else:
timestamp = response.get("server_modified") if is_file else iso_utc()
return {
"_id": response.get("id"),
"type": FILE if is_file else FOLDER,
"name": response.get("name"),
"file_path": response.get("path_display"),
"size": response.get("size") if is_file else 0,
"_timestamp": timestamp,
}