Headline Operations¶
Operations for managing headlines and headline-related data.
API Reference¶
HeadlineOperations
¶
Bases: BaseOperations, HeadlineOperationsMixin
Class to handle all operations related to headlines.
Methods:
-
create–Create a new headline.
-
update–Update a headline.
-
details–Get headline details.
-
list–Get headlines for a user or a meeting.
-
delete–Delete a headline.
Functions¶
create
¶
create(meeting_id: int, title: str, owner_id: int | None = None, notes: str | None = None) -> HeadlineInfo
Create a new headline.
Parameters:
-
meeting_id(int) –The ID of the meeting
-
title(str) –The title of the headline
-
owner_id(int | None, default:None) –The ID of the headline owner (default: current user ID)
-
notes(str | None, default:None) –Additional notes for the headline
Returns:
-
HeadlineInfo–A HeadlineInfo model instance containing id, title, owner_details,
-
HeadlineInfo–and notes_url
update
¶
Update a headline.
Parameters:
-
headline_id(int) –The ID of the headline to update
-
title(str) –The new title of the headline
details
¶
Get headline details.
Parameters:
-
headline_id(int) –The ID of the headline
Returns:
-
HeadlineDetails–A HeadlineDetails model instance containing id, title, notes_url,
-
HeadlineDetails–meeting_details, owner_details, archived, created_at, and closed_at
list
¶
Get headlines for a user or a meeting.
Parameters:
-
user_id(int | None, default:None) –The ID of the user (defaults to initialized user_id)
-
meeting_id(int | None, default:None) –The ID of the meeting
Returns:
-
list[HeadlineListItem]–A list of HeadlineListItem model instances containing:
-
list[HeadlineListItem]–- id
-
list[HeadlineListItem]–- title
-
list[HeadlineListItem]–- meeting_details
-
list[HeadlineListItem]–- owner_details
-
list[HeadlineListItem]–- archived
-
list[HeadlineListItem]–- created_at
-
list[HeadlineListItem]–- closed_at
Raises:
-
ValueError–If both user_id and meeting_id are provided
delete
¶
Delete a headline.
Parameters:
-
headline_id(int) –The ID of the headline to delete
Async Version¶
The async version AsyncHeadlineOperations provides the same methods as above, but with async/await support:
AsyncHeadlineOperations
¶
Async class to handle all operations related to headlines.
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 headline
headline = client.headline.create(
meeting_id=123,
title="Product launch successful",
notes="Exceeded targets by 15%"
)
# Get headline details
details = client.headline.details(headline_id=headline.id)
print(f"Created: {details.created_at}")
print(f"Archived: {details.archived}")
# List headlines for current user
headlines = client.headline.list()
# List headlines for a specific meeting
meeting_headlines = client.headline.list(meeting_id=123)
# Update headline title (returns None)
client.headline.update(
headline_id=headline.id,
title="Product launch exceeded expectations"
)
# Delete headline (returns None)
client.headline.delete(headline_id=headline.id)
import asyncio
from bloomy import AsyncClient
async def main():
async with AsyncClient(api_key="your-api-key") as client:
# Create a new headline
headline = await client.headline.create(
meeting_id=123,
title="Product launch successful",
notes="Exceeded targets by 15%"
)
# Get headline details
details = await client.headline.details(headline_id=headline.id)
print(f"Created: {details.created_at}")
print(f"Archived: {details.archived}")
# List headlines for current user
headlines = await client.headline.list()
# List headlines for a specific meeting
meeting_headlines = await client.headline.list(meeting_id=123)
# Update headline title (returns None)
await client.headline.update(
headline_id=headline.id,
title="Product launch exceeded expectations"
)
# Delete headline (returns None)
await client.headline.delete(headline_id=headline.id)
asyncio.run(main())
Available Methods¶
| Method | Description | Required Parameters | Optional Parameters |
|---|---|---|---|
create() |
Create a new headline | meeting_id (int), title (str) |
owner_id (int, defaults to current user), notes (str) |
update() |
Update a headline title | headline_id (int), title (str) |
None |
details() |
Get detailed headline information | headline_id (int) |
None |
list() |
Get headlines (defaults to current user) | None | user_id (int), meeting_id (int) |
delete() |
Delete a headline | headline_id (int) |
None |
Filtering
Like todos, headlines can be filtered by either user_id or meeting_id, but not both.
Default Behavior
When calling list() without parameters, it returns headlines for the current authenticated user. The create() method also defaults owner_id to the current user if not specified.
Return Values
The update() and delete() methods return None instead of boolean values.