Skip to content

Commit b4090c8

Browse files
feat: enhance Analyses class with snippet methods and improved documentation
Added listSnippets() and getSnippetFile() methods to fetch analysis code examples from TagoIO's public repository. Enhanced all existing methods with comprehensive docstrings following the Account class pattern, including descriptions, references, and practical examples. Updated type definitions to support new snippet functionality with SnippetRuntime, SnippetItem, and SnippetsListResponse types. Expanded test coverage with 8 new test cases and updated RST documentation with detailed method descriptions and code examples.
1 parent 5380bef commit b4090c8

5 files changed

Lines changed: 699 additions & 138 deletions

File tree

docs/source/Resources/Analysis/Analysis_Type.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,68 @@ AnalysisListItem
102102
| locked_at: Optional[datetime]
103103
104104
| console: Optional[List[str]]
105+
106+
107+
.. _SnippetRuntime:
108+
109+
SnippetRuntime
110+
--------------
111+
112+
Available runtime environments for snippets.
113+
114+
**Type:**
115+
116+
| Literal["node-legacy", "python-legacy", "node-rt2025", "python-rt2025", "deno-rt2025"]
117+
118+
119+
.. _SnippetItem:
120+
121+
SnippetItem
122+
-----------
123+
124+
Individual snippet metadata.
125+
126+
**Attributes:**
127+
128+
| id: str
129+
| Unique identifier for the snippet
130+
131+
| title: str
132+
| Human-readable title
133+
134+
| description: str
135+
| Description of what the snippet does
136+
137+
| language: str
138+
| Programming language (typescript, javascript, python)
139+
140+
| tags: List[str]
141+
| Array of tags for categorization
142+
143+
| filename: str
144+
| Filename of the snippet
145+
146+
| file_path: str
147+
| Full path to the file in the runtime directory
148+
149+
150+
.. _SnippetsListResponse:
151+
152+
SnippetsListResponse
153+
--------------------
154+
155+
API response containing all snippets metadata for a runtime.
156+
157+
**Attributes:**
158+
159+
| runtime: :ref:`SnippetRuntime`
160+
| Runtime environment identifier
161+
162+
| schema_version: int
163+
| Schema version for the API response format
164+
165+
| generated_at: str
166+
| ISO timestamp when the response was generated
167+
168+
| snippets: List[:ref:`SnippetItem`]
169+
| Array of all available snippets for this runtime

0 commit comments

Comments
 (0)