Skip to content

Commit

Permalink
Merge branch 'item_translation' of https://github.com/tr4nt0r/homeass…
Browse files Browse the repository at this point in the history
…istant-bring-api into item_translation
  • Loading branch information
tr4nt0r committed Feb 19, 2024
2 parents a44a6dd + 8d6d484 commit 46784d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bring_api/bring.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ async def login(self) -> BringAuthResponse:

locale = (await self.sync_current_user())["userLocale"]
self.headers["X-BRING-COUNTRY"] = locale["country"]
self.user_locale = f"{locale["country"]}-{locale["language"]}"
self.user_locale = f'{locale["language"]}-{locale["country"]}'

if len(self.__translations) == 0:
await self.__load_article_translations()
Expand Down Expand Up @@ -626,7 +626,7 @@ async def notify(
self,
list_uuid: str,
notification_type: BringNotificationType,
item_name: str,
item_name: Optional[str] = None,
) -> aiohttp.ClientResponse:
"""Send a push notification to all other members of a shared list.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = bring-api
version = 0.3.1
version = 0.5.0
author = Cyrill Raccaud
author_email = [email protected]
description = Unofficial package to access Bring! shopping lists API.
Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def test_push_notifications(bring: Bring, lst: BringList):
"""Test sending push notifications."""

# Send a going shopping notification
await bring.notify(lst["listUuid"], BringNotificationType.GOING_SHOPPING, "")
await bring.notify(lst["listUuid"], BringNotificationType.GOING_SHOPPING)

# Send a urgent message with argument item name
await bring.notify(
Expand Down

0 comments on commit 46784d3

Please sign in to comment.