Issue Operations¶
Operations for managing issues and issue-related data.
API Reference¶
IssueOperations
¶
Bases: BaseOperations, IssueOperationsMixin
Class to handle all operations related to issues.
Provides functionality to create, retrieve, list, and solve issues associated with meetings and users.
Methods:
-
details–Retrieve detailed information about a specific issue.
-
list–List issues filtered by user or meeting.
-
complete–Mark an issue as completed/solved.
-
update–Update an existing issue.
-
create–Create a new issue in the system.
-
create_many–Create multiple issues in a best-effort manner.
Functions¶
details
¶
Retrieve detailed information about a specific issue.
Parameters:
-
issue_id(int) –Unique identifier of the issue
Returns:
-
IssueDetails–An IssueDetails model instance containing detailed information
-
IssueDetails–about the issue
list
¶
List issues filtered by user or meeting.
Parameters:
-
user_id(int | None, default:None) –Unique identifier of the user (optional)
-
meeting_id(int | None, default:None) –Unique identifier of the meeting (optional)
Returns:
-
list[IssueListItem]–A list of IssueListItem model instances matching the filter criteria
Raises:
-
ValueError–When both user_id and meeting_id are provided
complete
¶
update
¶
Update an existing issue.
Parameters:
-
issue_id(int) –The ID of the issue to update
-
title(str | None, default:None) –New title for the issue (optional)
-
notes(str | None, default:None) –New notes for the issue (optional)
Returns:
-
IssueDetails–The updated IssueDetails
Raises:
-
ValueError–If no update fields are provided
create
¶
create(meeting_id: int, title: str, user_id: int | None = None, notes: str | None = None) -> CreatedIssue
Create a new issue in the system.
Parameters:
-
meeting_id(int) –Unique identifier of the associated meeting
-
title(str) –Title/name of the issue
-
user_id(int | None, default:None) –Unique identifier of the issue owner (defaults to current user)
-
notes(str | None, default:None) –Additional notes or description for the issue (optional)
Returns:
-
CreatedIssue–A CreatedIssue model instance containing the newly created issue details
create_many
¶
Create multiple issues in a best-effort manner.
Processes each issue sequentially to avoid rate limiting. Failed operations are captured and returned alongside successful ones.
Parameters:
-
issues(list[dict[str, Any]]) –List of dictionaries containing issue data. Each dict should have: - meeting_id (required): ID of the associated meeting - title (required): Title of the issue - user_id (optional): ID of the issue owner (defaults to current user) - notes (optional): Additional notes for the issue
Returns:
-
BulkCreateResult[CreatedIssue]–BulkCreateResult containing: - successful: List of CreatedIssue instances for successful creations - failed: List of BulkCreateError instances for failed creations
Async Version¶
The async version AsyncIssueOperations provides the same methods as above, but with async/await support:
AsyncIssueOperations
¶
Async class to handle all operations related to issues.
Async Usage
All methods have the same parameters and return types as their sync counterparts. Simply add await before each method call.
Usage Examples¶
from bloomy import Client
with Client(api_key="your-api-key") as client:
# Create a new issue
issue = client.issue.create(
meeting_id=123,
title="Server performance degradation",
notes="Response times increased by 50% during peak hours"
)
# Get issue details
details = client.issue.details(issue_id=issue.id)
print(f"Created: {details.created_at}")
print(f"Meeting: {details.meeting_title}")
print(f"Assigned to: {details.user_name}")
# List issues for current user
my_issues = client.issue.list()
# List issues for a specific meeting
meeting_issues = client.issue.list(meeting_id=123)
# Update an issue
updated = client.issue.update(
issue_id=issue.id,
title="Updated: Server performance degradation",
notes="Added monitoring and identified bottleneck"
)
# Complete an issue (mark as solved)
completed = client.issue.complete(issue_id=issue.id)
print(f"Completed: {completed.title}")
import asyncio
from bloomy import AsyncClient
async def main():
async with AsyncClient(api_key="your-api-key") as client:
# Create a new issue
issue = await client.issue.create(
meeting_id=123,
title="Server performance degradation",
notes="Response times increased by 50% during peak hours"
)
# Get issue details
details = await client.issue.details(issue_id=issue.id)
print(f"Created: {details.created_at}")
print(f"Meeting: {details.meeting_title}")
print(f"Assigned to: {details.user_name}")
# List issues for current user
my_issues = await client.issue.list()
# List issues for a specific meeting
meeting_issues = await client.issue.list(meeting_id=123)
# Update an issue
updated = await client.issue.update(
issue_id=issue.id,
title="Updated: Server performance degradation",
notes="Added monitoring and identified bottleneck"
)
# Complete an issue (mark as solved)
completed = await client.issue.complete(issue_id=issue.id)
print(f"Completed: {completed.title}")
asyncio.run(main())
Available Methods¶
| Method | Description | Parameters | Returns |
|---|---|---|---|
details() |
Get detailed issue information | issue_id |
IssueDetails |
list() |
Get issues | user_id, meeting_id |
list[IssueListItem] |
create() |
Create a new issue | meeting_id, title, user_id, notes |
CreatedIssue |
create_many() |
Create multiple issues | issues |
BulkCreateResult[CreatedIssue] |
update() |
Update an existing issue | issue_id, title, notes |
IssueDetails |
complete() |
Mark an issue as solved | issue_id |
IssueDetails |
Issue Management
- Issues can only be marked as solved, not deleted. Use the
complete()method to close an issue. - The
complete()method returns the updated issue details, allowing you to verify the completion. - Use
update()to modify issue title or notes before completing.
Update Examples¶
from bloomy import Client
with Client(api_key="your-api-key") as client:
# Update issue title only
updated = client.issue.update(123, title="New Title")
# Update issue notes only
updated = client.issue.update(123, notes="Additional context and details")
# Update both title and notes
updated = client.issue.update(
issue_id=123,
title="Critical: Database Connection Pool Exhausted",
notes="Increased max connections from 100 to 200"
)
import asyncio
from bloomy import AsyncClient
async def main():
async with AsyncClient(api_key="your-api-key") as client:
# Update issue title only
updated = await client.issue.update(123, title="New Title")
# Update issue notes only
updated = await client.issue.update(123, notes="Additional context and details")
# Update both title and notes
updated = await client.issue.update(
issue_id=123,
title="Critical: Database Connection Pool Exhausted",
notes="Increased max connections from 100 to 200"
)
asyncio.run(main())
Update Requirements
At least one of title or notes must be provided when calling update(). If neither is provided, a ValueError will be raised.
Bulk Operations¶
Creating Multiple Issues¶
from bloomy import Client
with Client(api_key="your-api-key") as client:
# Create multiple issues at once
issues = [
{
"meeting_id": 123,
"title": "Server performance degradation",
"notes": "Response times increased by 50%"
},
{
"meeting_id": 123,
"title": "Database connection pool exhausted",
"user_id": 456,
"notes": "Max connections reached during peak hours"
},
{
"meeting_id": 789,
"title": "Authentication service timeout"
}
]
result = client.issue.create_many(issues)
# Check results
print(f"Successfully created {len(result.successful)} issues")
for issue in result.successful:
print(f"- Issue #{issue.id}: {issue.title}")
# Handle failures
if result.failed:
print(f"Failed to create {len(result.failed)} issues")
for error in result.failed:
print(f"- Index {error.index}: {error.error}")
print(f" Input: {error.input_data}")
import asyncio
from bloomy import AsyncClient
async def main():
async with AsyncClient(api_key="your-api-key") as client:
# Create multiple issues concurrently
issues = [
{
"meeting_id": 123,
"title": "Server performance degradation",
"notes": "Response times increased by 50%"
},
{
"meeting_id": 123,
"title": "Database connection pool exhausted",
"user_id": 456,
"notes": "Max connections reached during peak hours"
},
{
"meeting_id": 789,
"title": "Authentication service timeout"
}
]
# Control concurrency with max_concurrent parameter
result = await client.issue.create_many(issues, max_concurrent=5)
# Check results
print(f"Successfully created {len(result.successful)} issues")
for issue in result.successful:
print(f"- Issue #{issue.id}: {issue.title}")
# Handle failures
if result.failed:
print(f"Failed to create {len(result.failed)} issues")
for error in result.failed:
print(f"- Index {error.index}: {error.error}")
print(f" Input: {error.input_data}")
asyncio.run(main())
Async Rate Limiting
The async version of create_many() supports a max_concurrent parameter (default: 5) to control the maximum number of concurrent requests. This helps prevent rate limiting issues when creating large batches of issues.
Bulk Operation Best Practices
- Best-effort approach:
create_many()continues processing even if some issues fail to create - Check both lists: Always inspect both
result.successfulandresult.failedto handle partial failures - Required fields: Each issue dict must include
meeting_idandtitle - Optional fields:
user_iddefaults to the authenticated user if not provided - Error handling: Failed creations include the original input data and error message for debugging