Bundles the flamenco-api and kitsu-api skills as Claude Code plugins under an "adm-tools" marketplace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5.4 KiB
5.4 KiB
Kitsu Event Types
Events are emitted in real-time via Server-Sent Events (SSE) and stored in the event log.
Listening to Events
import gazu
gazu.set_host("https://kitsu.mystudio.com/api")
gazu.set_event_host("https://kitsu.mystudio.com") # no /api suffix
gazu.log_in("user@studio.com", "password")
event_client = gazu.events.init()
def handler(data):
print(data)
gazu.events.add_listener(event_client, "task:status-changed", handler)
gazu.events.run_client(event_client) # blocks
Run the listener in a separate thread since run_client() blocks.
Event Naming Convention
Pattern: entity_type:action
Entity type is the model name lowercased with spaces replaced by hyphens.
Callback Data
The callback data dict always includes:
- The entity ID (e.g.,
asset_id,shot_id,task_id) project_idwhen relevant
Complete Event List
Assets
asset:new— Asset createdasset:update— Asset updatedasset:delete— Asset deletedasset:new-link— Asset linked to another entityasset:remove-link— Asset link removedasset:casting-update— Asset casting changedasset-type:new— Asset type createdasset-type:update— Asset type updatedasset-type:delete— Asset type deletedasset-instance:new— Asset instance createdasset-instance:update— Asset instance updatedasset-instance:delete— Asset instance deleted
Shots / Sequences / Episodes / Scenes
shot:new— Shot createdshot:update— Shot updatedshot:delete— Shot deletedshot:casting-update— Shot casting changedsequence:new— Sequence createdsequence:update— Sequence updatedsequence:delete— Sequence deletedepisode:new— Episode createdepisode:update— Episode updatedepisode:delete— Episode deletedscene:new— Scene createdscene:update— Scene updatedscene:delete— Scene deleted
Tasks
task:new— Task createdtask:update— Task updatedtask:delete— Task deletedtask:assign— Person assigned to tasktask:unassign— Person unassigned from tasktask:status-changed— Task status changed (via comment)task:to-review— Task sent for reviewtask-type:new— Task type createdtask-type:update— Task type updatedtask-type:delete— Task type deletedtask-status:new— Task status createdtask-status:update— Task status updatedtask-status:delete— Task status deleted
Comments
comment:new— Comment postedcomment:update— Comment editedcomment:delete— Comment removedcomment:reply— Reply added to commentcomment:acknowledge— Comment acknowledged
Files
preview-file:new— Preview file uploadedpreview-file:update— Preview file updatedworking-file:new— Working file createdoutput-file:new— Output file createdoutput-file:update— Output file updatedoutput-file:delete— Output file deleted
Persons
person:new— Person createdperson:update— Person updatedperson:delete— Person deleted
Projects
project:new— Project createdproject:update— Project updatedproject:delete— Project deleted
Edits & Concepts
edit:new— Edit creatededit:update— Edit updatededit:delete— Edit deletedconcept:new— Concept createdconcept:update— Concept updatedconcept:delete— Concept deleted
Playlists
playlist:new— Playlist createdplaylist:update— Playlist updatedplaylist:delete— Playlist deleted
Notifications
notification:new— Notification creatednotification:update— Notification updatednotification:delete— Notification deleted
Chat
chat:new— Chat createdchat:update— Chat updatedchat:delete— Chat deletedchat-message:new— Message sentchat-message:update— Message editedchat-message:delete— Message deleted
News
news:new— News item creatednews:update— News item updatednews:delete— News item deleted
Entity Links
entity-link:new— Entity link createdentity-link:delete— Entity link removed
Budget
budget:new— Budget createdbudget:update— Budget updatedbudget:delete— Budget deletedbudget-entry:new— Budget entry createdbudget-entry:update— Budget entry updatedbudget-entry:delete— Budget entry deleted
Schedule
schedule-item:new— Schedule item createdschedule-item:update— Schedule item updatedschedule-item:delete— Schedule item deletedmilestone:new— Milestone createdmilestone:update— Milestone updatedmilestone:delete— Milestone deleted
Time Tracking
time-spent:new— Time entry createdtime-spent:update— Time entry updatedtime-spent:delete— Time entry deleted
Build Jobs
build-job:new— Build job createdbuild-job:update— Build job updatedbuild-job:delete— Build job deleted
Reading Event History
# Recent events
events = gazu.client.get("data/events/last?page_size=100")
# Filter by date
events = gazu.client.get("data/events/last?page_size=100&before=2024-02-01&after=2024-01-01")
# File events only
events = gazu.client.get("data/events/last?page_size=100&only_files=true")
# Login logs
logs = gazu.client.get("data/events/login-logs/last")