Skip to content

Headline Operations (v2)

GraphQL operations for managing headlines. See the v2 guide for how client.v2 relates to client.v1/client.headline, and for the description ("notes") behavior shared across v2 entities.

API Reference

HeadlineOperations

HeadlineOperations(client: Any, graphql_url: str, user_id_cache: UserIdCache | None = None)

Bases: GraphQLOperations, HeadlineOperationsMixin

Class to handle v2 (GraphQL) operations related to headlines.

Methods:

  • details –

    Get details for a headline.

  • list –

    List headlines for a meeting or a user.

  • create –

    Create a new headline.

  • update –

    Update an existing headline.

  • archive –

    Archive a headline.

  • restore –

    Restore an archived headline.

Methods:

details
details(headline_id: int) -> Headline

Get details for a headline.

Parameters:

  • headline_id (int) –

    The ID of the headline.

Returns:

  • Headline –

    A Headline model instance.

Example
client.v2.headline.details(123)
# Returns: Headline(id=123, title='Headline Title', ...)
list
list(meeting_id: int | None = None, user_id: int | None = None, *, include_archived: bool = False) -> list[Headline]

List headlines for a meeting or a user.

Parameters:

  • meeting_id (int | None, default: None ) –

    The ID of the meeting. Mutually exclusive with user_id.

  • user_id (int | None, default: None ) –

    The ID of the headline owner. Mutually exclusive with meeting_id. If neither is given, defaults to the current user.

  • include_archived (bool, default: False ) –

    If True, also include archived headlines.

Returns:

  • list[Headline] –

    A list of Headline model instances, ordered by creation date.

Raises:

  • ValueError –

    If both meeting_id and user_id are provided.

Example
client.v2.headline.list(meeting_id=349524)
# Returns: [Headline(id=1, title='Headline 1', ...), ...]
create
create(meeting_id: int, title: str, user_id: int | None = None, notes: str | None = None) -> Headline

Create a new headline.

Parameters:

  • meeting_id (int) –

    The ID of the meeting to create the headline in. CreateHeadline requires exactly one meeting.

  • title (str) –

    The title of the headline.

  • user_id (int | None, default: None ) –

    The ID of the headline owner (defaults to the current user).

  • notes (str | None, default: None ) –

    Description text for the headline.

Returns:

  • Headline –

    The newly created Headline.

Example
client.v2.headline.create(349524, "New Headline", notes="Details")
# Returns: Headline(id=456, title='New Headline', ...)
update
update(headline_id: int, *, title: str | None = None, user_id: int | None = None, notes: str | None = None) -> Headline

Update an existing headline.

Parameters:

  • headline_id (int) –

    The ID of the headline to update.

  • title (str | None, default: None ) –

    New title for the headline.

  • user_id (int | None, default: None ) –

    New owner for the headline.

  • notes (str | None, default: None ) –

    New description text for the headline.

Returns:

Raises:

  • ValueError –

    If no update fields are provided.

Example
client.v2.headline.update(123, title="New Title")
# Returns: Headline(id=123, title='New Title', ...)
archive
archive(headline_id: int) -> Headline

Archive a headline.

Parameters:

  • headline_id (int) –

    The ID of the headline to archive.

Returns:

restore
restore(headline_id: int) -> Headline

Restore an archived headline.

Parameters:

  • headline_id (int) –

    The ID of the headline to restore.

Returns:

Async Version

The async version AsyncHeadlineOperations provides the same methods as above, but with async/await support:

AsyncHeadlineOperations

AsyncHeadlineOperations(client: Any, graphql_url: str, user_id_cache: UserIdCache | None = None)

Async class to handle v2 (GraphQL) 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.v2.headline.create(
        meeting_id=123,
        title="Product launch successful",
        notes="Exceeded targets by 15%",
    )

    # Get headline details
    details = client.v2.headline.details(headline.id)

    # List headlines for a meeting (open only, by default)
    meeting_headlines = client.v2.headline.list(meeting_id=123)

    # Include archived headlines too
    all_headlines = client.v2.headline.list(meeting_id=123, include_archived=True)

    # List headlines for the current user instead
    my_headlines = client.v2.headline.list()

    # Update the title
    updated = client.v2.headline.update(headline.id, title="Updated title")

    # Archive, then restore
    client.v2.headline.archive(headline.id)
    client.v2.headline.restore(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.v2.headline.create(
            meeting_id=123,
            title="Product launch successful",
            notes="Exceeded targets by 15%",
        )

        # List headlines for a meeting (open only, by default)
        meeting_headlines = await client.v2.headline.list(meeting_id=123)

        # Update the title
        updated = await client.v2.headline.update(headline.id, title="Updated title")

        # Archive, then restore
        await client.v2.headline.archive(headline.id)
        await client.v2.headline.restore(headline.id)

asyncio.run(main())

Available Methods

Method Description Parameters Returns
details() Get a headline headline_id Headline
list() List headlines for a meeting or a user meeting_id, user_id, include_archived list[Headline]
create() Create a headline meeting_id, title, user_id, notes Headline
update() Update a headline headline_id, title, user_id, notes Headline
archive() Archive a headline headline_id Headline
restore() Restore an archived headline headline_id Headline

Filtering

list() accepts either meeting_id or user_id, not both. Passing both raises ValueError. If neither is given, it defaults to the current user.

Update requirements

At least one field must be provided to update(), or it raises ValueError.