{"openapi":"3.1.0","info":{"title":"Tease API","version":"1"},"tags":[{"name":"Media cache"}],"servers":[{"url":"https://app.tease.club"}],"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"MediaIds":{"properties":{"media_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Media Ids"}},"type":"object","required":["media_ids"],"title":"MediaIds","description":"Vault media ids to read (and cache if needed) in one call."}}},"paths":{"/v1/accounts/{account_id}/media-cache/media":{"get":{"summary":"List cached media","description":"The account's cached media, the most recently cached first.","operationId":"list_cached_media_v1_accounts__account_id__media_cache_media_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Type"}},{"name":"cached_from","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Cached From"}},{"name":"cached_to","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Cached To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]},"delete":{"summary":"Clear the media cache","description":"Remove every cached file of the account.","operationId":"purge_cached_media_v1_accounts__account_id__media_cache_media_delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/media/batch":{"post":{"summary":"Cache several media","description":"Several vault media items, each cached now if it was not; unknown ids are left out.","operationId":"cached_media_batch_v1_accounts__account_id__media_cache_media_batch_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaIds"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/media/{media_id}":{"get":{"summary":"Read cached media","description":"One vault media item with its stored qualities; it is cached now if it was not.","operationId":"get_cached_media_v1_accounts__account_id__media_cache_media__media_id__get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Media Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]},"delete":{"summary":"Delete cached media","description":"Remove one media item's cached files.","operationId":"delete_cached_media_v1_accounts__account_id__media_cache_media__media_id__delete","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Media Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/media/{media_id}/content":{"get":{"summary":"Download cached media","description":"The stored file; `full` is read from the platform on first ask (202 until stored), refused on the trial (403 full_media_not_in_plan): Tease Club and Tease Pro have it.","operationId":"cached_media_content_v1_accounts__account_id__media_cache_media__media_id__content_get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Media Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}},{"name":"quality","in":"query","required":false,"schema":{"enum":["thumb","full"],"type":"string","default":"thumb","title":"Quality"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/lists":{"get":{"summary":"List cached vault lists","description":"The vault lists that have cached media, with how many and when one was last cached.","operationId":"list_cached_lists_v1_accounts__account_id__media_cache_lists_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/lists/{list_id}/media":{"get":{"summary":"List media of a cached list","description":"The cached media of one vault list.","operationId":"list_cached_list_media_v1_accounts__account_id__media_cache_lists__list_id__media_get","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"List Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/lists/{list_id}/add":{"post":{"summary":"Cache a vault list","description":"Cache every media of a vault list we hold a copy of; `remaining` asks for another call.","operationId":"add_list_to_cache_v1_accounts__account_id__media_cache_lists__list_id__add_post","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"List Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/lists/{list_id}/sync":{"put":{"summary":"Sync a list cache","description":"Match the cache to the list as collected: cache what joined, unmark what left.","operationId":"sync_list_cache_v1_accounts__account_id__media_cache_lists__list_id__sync_put","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"List Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"write","tags":["Media cache"]}},"/v1/accounts/{account_id}/media-cache/status":{"get":{"summary":"Read cache status","description":"How many of the account's media are cached and how much space they take.","operationId":"cache_status_v1_accounts__account_id__media_cache_status_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-api-key-scope":"read","tags":["Media cache"]}},"/v1/media-cache/stats":{"get":{"summary":"Read media cache stats","description":"The media cache over all of the key's accounts.","operationId":"cache_stats_v1_media_cache_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-api-key-scope":"read","tags":["Media cache"]}}}}
