Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_tasks.api.AsyncConfigEntryAuth Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, config_entry_oauth2_flow.OAuth2Session oauth2_session)
 
str async_get_access_token (self)
 
None delete (self, str task_list_id, list[str] task_ids)
 
None insert (self, str task_list_id, dict[str, Any] task)
 
list[dict[str, Any]] list_task_lists (self)
 
list[dict[str, Any]] list_tasks (self, str task_list_id)
 
None move (self, str task_list_id, str task_id, str|None previous)
 
None patch (self, str task_list_id, str task_id, dict[str, Any] task)
 

Private Member Functions

Any _execute (self, HttpRequest|BatchHttpRequest request)
 
Resource _get_service (self)
 

Private Attributes

 _hass
 
 _oauth_session
 

Detailed Description

Provide Google Tasks authentication tied to an OAuth2 based config entry.

Definition at line 35 of file api.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.__init__ (   self,
HomeAssistant  hass,
config_entry_oauth2_flow.OAuth2Session  oauth2_session 
)
Initialize Google Tasks Auth.

Definition at line 38 of file api.py.

Member Function Documentation

◆ _execute()

Any homeassistant.components.google_tasks.api.AsyncConfigEntryAuth._execute (   self,
HttpRequest | BatchHttpRequest  request 
)
private

Definition at line 150 of file api.py.

◆ _get_service()

Resource homeassistant.components.google_tasks.api.AsyncConfigEntryAuth._get_service (   self)
private
Get current resource.

Definition at line 52 of file api.py.

◆ async_get_access_token()

str homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.async_get_access_token (   self)
Return a valid access token.

Definition at line 47 of file api.py.

◆ delete()

None homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.delete (   self,
str  task_list_id,
list[str]  task_ids 
)
Delete a task resources.

Definition at line 106 of file api.py.

◆ insert()

None homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.insert (   self,
str  task_list_id,
dict[str, Any]  task 
)
Create a new Task resource on the task list.

Definition at line 78 of file api.py.

◆ list_task_lists()

list[dict[str, Any]] homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.list_task_lists (   self)
Get all TaskList resources.

Definition at line 59 of file api.py.

◆ list_tasks()

list[dict[str, Any]] homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.list_tasks (   self,
str  task_list_id 
)
Get all Task resources for the task list.

Definition at line 66 of file api.py.

◆ move()

None homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.move (   self,
str  task_list_id,
str  task_id,
str | None  previous 
)
Move a task resource to a specific position within the task list.

Definition at line 135 of file api.py.

◆ patch()

None homeassistant.components.google_tasks.api.AsyncConfigEntryAuth.patch (   self,
str  task_list_id,
str  task_id,
dict[str, Any]  task 
)
Update a task resource.

Definition at line 91 of file api.py.

Member Data Documentation

◆ _hass

homeassistant.components.google_tasks.api.AsyncConfigEntryAuth._hass
private

Definition at line 44 of file api.py.

◆ _oauth_session

homeassistant.components.google_tasks.api.AsyncConfigEntryAuth._oauth_session
private

Definition at line 45 of file api.py.


The documentation for this class was generated from the following file: