This repository was archived by the owner on Sep 16, 2020. It is now read-only.
Open
Conversation
added 9 commits
February 28, 2018 17:05
…g put into albums
Open
| # Docs | ||
| Targets python >3.5 | ||
|
|
||
| This project: https://github.com/Yarn/Listen |
|
|
||
| ## Install | ||
| ```bash | ||
| pip install git+https://github.com/Yarn/Listen.git |
| else: | ||
| print(msg.raw) | ||
|
|
||
| cl = listen.client.Client() |
Owner
There was a problem hiding this comment.
This can probably be imported from listen.Client() more pythonic, imo
| cl.loop.create_task(cl.start()) | ||
| ``` | ||
|
|
||
| you can get updates for kpop by setting `kpop=True` |
|
|
||
| # Support | ||
|
|
||
| Ping Nyar#3343 in the #development channel on the |
Owner
There was a problem hiding this comment.
Adding me here would be nice (Recchan#0194)
|
|
||
| @ensure_token | ||
| async def remove_favorite(self, song_id: int) -> None: | ||
| return await self.favorite(song_id, remove=True) |
Owner
There was a problem hiding this comment.
If this is self.remove_favorite could be have a protected method like self._favorite and then change the current self.favorite to self.add_favorite (to keep naming consistency)
listen/client.py
Outdated
| self.ws = await websockets.connect(SOCKET_ENDPOINT) | ||
| url = self._websocket_url | ||
|
|
||
| self._ws = await websockets.connect(url) |
Owner
There was a problem hiding this comment.
use self._websocket_url directly?
listen/client.py
Outdated
| await self.send_ws(msg) | ||
|
|
||
| async def start(self): | ||
| if self._ws is None: |
| continue | ||
|
|
||
| wrapped_message = wrap_message(data) | ||
| await self.ws_handler(wrapped_message) |
Owner
There was a problem hiding this comment.
await self.ws_handler(wrap_message(data))
| SONG_REQUEST = BASE_URL + "songs/request" | ||
|
|
||
| SOCKET_ENDPOINT = "wss://listen.moe/api/v2/socket" | ||
| LIBRARY_URL = "https://github.com/Yarn/Listen" |
Yarn
commented
Jun 12, 2018
| "User-Agent": "Listen (https://github.com/GetRektByMe/Listen)", | ||
| "Content-Type": "application/json" | ||
| self._headers: Dict[str, str] = { | ||
| "User-Agent": "Listen (https://github.com/Yarn/Listen)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
breaking change but for literally everything