webapp.collections_api module

Collections API Endpoints for WebApp (My Collections)

MVP: ידני בלבד + חוקים בסיסיים (compute_smart_items) ללא שיתוף/ייצוא. מוגן ע“י require_auth, כולל dynamic_cache ואירועי observability.

webapp.collections_api.emit_event(event, severity='info', **fields)[מקור]
פרמטרים:
webapp.collections_api.get_db()[מקור]
webapp.collections_api.get_manager()[מקור]
webapp.collections_api.require_auth(f)[מקור]
webapp.collections_api.sanitize_input(text, max_length=500)[מקור]
Return type:

str

פרמטרים:
webapp.collections_api.tags_rate_limit(key, max_per_minute)[מקור]
פרמטרים:
  • key (str)

  • max_per_minute (int)

webapp.collections_api.create_collection()
webapp.collections_api.list_collections()
webapp.collections_api.get_collection(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.update_collection(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.delete_collection(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.get_items(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.add_items(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.remove_items(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.reorder_items(collection_id)
פרמטרים:

collection_id (str)

webapp.collections_api.update_item_tags(item_id)

עדכון תגיות של פריט באוסף.

Body: {”tags“: [“🔥“, ”🐛“]}

פרמטרים:

item_id (str)

webapp.collections_api.get_tags_metadata()

קבלת מטאדאטה של תגיות זמינות.

webapp.collections_api.log_tags_filtered()

Log filtering usage for analytics/observability.

webapp.collections_api.update_share(collection_id)

הפעלת/ביטול שיתוף עבור אוסף. Body: {enabled: bool}

פרמטרים:

collection_id (str)

webapp.collections_api.get_shared_collection(token)

שליפת אוסף משותף לצפייה ציבורית ללא התחברות (JSON בלבד).

פרמטרים:

token (str)

webapp.collections_api.get_shared_file(token, file_id)
פרמטרים:
webapp.collections_api.download_shared_file(token, file_id)
פרמטרים:
webapp.collections_api.export_shared_collection(token)
פרמטרים:

token (str)

webapp.collections_api.save_shared_collection_to_webapp(token)

שמירת כל האוסף המשותף ב-Webapp (יוצר אוסף חדש אצל המשתמש ומעתיק את הקבצים).

פרמטרים:

token (str)

webapp.collections_api.save_shared_file_to_webapp(token, file_id)

שמירת קובץ בודד מהאוסף המשותף ב-Webapp (לתוך אוסף »שולחן עבודה« כברירת מחדל).

פרמטרים:
webapp.collections_api.not_found(error)
webapp.collections_api.internal_error(error)