feat(metabase): nuevos modulos — snippets, notifications, dashboard_filters
Tres modulos nuevos con funciones CRUD completas: - snippets: list, get, create, update, archive (SQL reutilizable) - notifications: list, create_card_alert, create_dashboard_subscription, update, delete - dashboard_filters: add_dashboard_filter (parameter_mappings sobre cards existentes) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: metabase_get_snippet
|
||||
kind: function
|
||||
lang: py
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "def metabase_get_snippet(client: MetabaseClient, snippet_id: int) -> dict"
|
||||
description: "Obtiene un SQL snippet de Metabase por su ID. Endpoint: GET /api/native-query-snippet/:id."
|
||||
tags: [metabase, snippet, get, api, python]
|
||||
uses_functions: []
|
||||
uses_types: [MetabaseClient_go_infra]
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [httpx]
|
||||
params:
|
||||
- name: client
|
||||
desc: "instancia autenticada de MetabaseClient"
|
||||
- name: snippet_id
|
||||
desc: "ID numerico del snippet a obtener"
|
||||
output: "dict: snippet completo con id, name, content, description, collection_id, creator_id, archived, created_at, updated_at"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "python/functions/metabase/snippets.py"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```python
|
||||
snippet = metabase_get_snippet(client, 42)
|
||||
print(snippet["name"])
|
||||
print(snippet["content"])
|
||||
print(snippet["description"])
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Retorna 404 si el snippet no existe.
|
||||
Util para verificar el contenido actual antes de hacer un update.
|
||||
Reference in New Issue
Block a user