Добавлено 2 эндпоинта на скип текущего и возврат прошлого сонга
All checks were successful
Verify Dev Build / publish (push) Successful in 32s
All checks were successful
Verify Dev Build / publish (push) Successful in 32s
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "oxidespotify"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
description = "Client for Spotify API"
|
||||
readme = "README.md"
|
||||
authors = [{ name = "Miwory", email = "miwory.uwu@gmail.com" }]
|
||||
|
||||
@ -128,11 +128,27 @@ class SpotifyAPIClient(OxideHTTP):
|
||||
async def pause_playback(self) -> NoReturn:
|
||||
raise NotImplementedError
|
||||
|
||||
async def skip_to_next(self) -> NoReturn:
|
||||
raise NotImplementedError
|
||||
async def skip_to_next(self, access_token: str, device_id: str) -> None:
|
||||
req = self.post(
|
||||
'/me/player/next',
|
||||
params={'device_id': device_id},
|
||||
headers=self._auth(access_token),
|
||||
)
|
||||
|
||||
async def skip_to_previous(self) -> NoReturn:
|
||||
raise NotImplementedError
|
||||
req = await self._process_request(req)
|
||||
return await self._process(req, None)
|
||||
|
||||
async def skip_to_previous(
|
||||
self, access_token: str, device_id: str
|
||||
) -> None:
|
||||
req = self.post(
|
||||
'/me/player/previous',
|
||||
params={'device_id': device_id},
|
||||
headers=self._auth(access_token),
|
||||
)
|
||||
|
||||
req = await self._process_request(req)
|
||||
return await self._process(req, None)
|
||||
|
||||
async def seek_to_position(self) -> NoReturn:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user