Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/linq/resources/chats/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ def set(
`group_chat_icon` works. A URL we cannot fetch, or one that isn't an image, is
rejected with a `400` (`5007`/`5006`) rather than failing later on the device.

shades: Color with `variant: custom`: the two gradient stops as hex, top then bottom.
Ignored for named color variants (they carry their own two colors).
Example: `https://cdn.linqapp.com/u/bg.jpg`.

style: Dynamic: the animated style.
shades: Color with `variant: custom`: the two gradient stops as hex, top then bottom —
e.g. `["#F2C4E1", "#F5A623"]`. Ignored for named color variants (they carry
their own two colors).

style: Dynamic: the animated style — `sky`, `water`, or `aurora`.

variant: Color: a named swatch — `mango`, `ice`, `plum`, `deep_sea`, `green_apple`,
`cherry`, `bubblegum`, `tangerine`, `magenta`, `lime`, `silver`, `carbon`,
Expand Down Expand Up @@ -286,10 +289,13 @@ async def set(
`group_chat_icon` works. A URL we cannot fetch, or one that isn't an image, is
rejected with a `400` (`5007`/`5006`) rather than failing later on the device.

shades: Color with `variant: custom`: the two gradient stops as hex, top then bottom.
Ignored for named color variants (they carry their own two colors).
Example: `https://cdn.linqapp.com/u/bg.jpg`.

shades: Color with `variant: custom`: the two gradient stops as hex, top then bottom —
e.g. `["#F2C4E1", "#F5A623"]`. Ignored for named color variants (they carry
their own two colors).

style: Dynamic: the animated style.
style: Dynamic: the animated style — `sky`, `water`, or `aurora`.

variant: Color: a named swatch — `mango`, `ice`, `plum`, `deep_sea`, `green_apple`,
`cherry`, `bubblegum`, `tangerine`, `magenta`, `lime`, `silver`, `carbon`,
Expand Down
9 changes: 6 additions & 3 deletions src/linq/types/chats/background_set_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@ class BackgroundSetParams(TypedDict, total=False):
is accepted — the same way `group_chat_icon` works. A URL we cannot fetch, or
one that isn't an image, is rejected with a `400` (`5007`/`5006`) rather than
failing later on the device.

Example: `https://cdn.linqapp.com/u/bg.jpg`.
"""

shades: SequenceNotStr[str]
"""
Color with `variant: custom`: the two gradient stops as hex, top then bottom.
Ignored for named color variants (they carry their own two colors).
Color with `variant: custom`: the two gradient stops as hex, top then bottom —
e.g. `["#F2C4E1", "#F5A623"]`. Ignored for named color variants (they carry
their own two colors).
"""

style: Literal["sky", "water", "aurora"]
"""Dynamic: the animated style."""
"""Dynamic: the animated style — `sky`, `water`, or `aurora`."""

variant: str
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/chats/test_background.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def test_method_set_with_all_params(self, client: LinqAPIV3) -> None:
background = client.chats.background.set(
chat_id="550e8400-e29b-41d4-a716-446655440000",
type="color",
image_url="https://cdn.linqapp.com/u/bg.jpg",
shades=["#F2C4E1", "#F5A623"],
image_url="https://example.com",
shades=["string", "string"],
style="sky",
variant="mango",
)
Expand Down Expand Up @@ -179,8 +179,8 @@ async def test_method_set_with_all_params(self, async_client: AsyncLinqAPIV3) ->
background = await async_client.chats.background.set(
chat_id="550e8400-e29b-41d4-a716-446655440000",
type="color",
image_url="https://cdn.linqapp.com/u/bg.jpg",
shades=["#F2C4E1", "#F5A623"],
image_url="https://example.com",
shades=["string", "string"],
style="sky",
variant="mango",
)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading