-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2021-2024 Bendik R. Brenne | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,90 @@ | ||
# PodPlay API | ||
# podplay-api | ||
|
||
[![GitHub Release][releases-shield]][releases] | ||
[![Python Versions][py-versions-shield]][py-versions] | ||
![Project Maintenance][maintenance-shield] | ||
[![License][license-shield]](LICENSE.md) | ||
|
||
[![Build Status][build-shield]][build] | ||
[![Code coverage][codecov-shield]][codecov] | ||
|
||
|
||
Asynchronous Python client for the PodPlay.com API | ||
|
||
## Installation | ||
|
||
```bash | ||
pip install podplay-api | ||
``` | ||
|
||
## Usage | ||
|
||
The following are some basic examples of how to use the library. | ||
|
||
Get information about a specific podcast: | ||
|
||
```python | ||
import asyncio | ||
|
||
from podplay_api import PodPlayClient | ||
|
||
|
||
async def main(): | ||
"""Main function.""" | ||
async with PodPlayClient() as client: | ||
podcast = await client.get_podcast(podcast_id=31428) | ||
print(podcast) | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) | ||
``` | ||
|
||
Get all episodes for a specific podcast: | ||
|
||
```python | ||
episodes = await client.get_podcast_episodes(podcast_id=31428) | ||
for episode in episodes: | ||
print(episode) | ||
``` | ||
|
||
Search for a specific podcast: | ||
|
||
```python | ||
search_results = await client.search_podcast("dude") | ||
for podcast in search_results: | ||
print(podcast) | ||
``` | ||
|
||
Get top podcasts of a category: | ||
|
||
```python | ||
podcasts = await client.get_podcasts_by_category(31428) | ||
for podcast in podcasts: | ||
print(podcast) | ||
``` | ||
|
||
|
||
## Contributing | ||
|
||
If you'd like to contribute to the project, please submit a pull request or open an issue on the GitHub repository. | ||
|
||
## License | ||
|
||
podplay-api is licensed under the MIT license. See the LICENSE file for more details. | ||
|
||
## Contact | ||
|
||
If you have any questions or need assistance with the library, you can contact the project maintainer at @bendikrb. | ||
|
||
[license-shield]: https://img.shields.io/github/license/bendikrb/podplay_api.svg | ||
[license]: https://github.com/bendikrb/podplay_api/blob/main/LICENSE | ||
[releases-shield]: https://img.shields.io/pypi/v/podplay-api | ||
[releases]: https://github.com/bendikrb/podplay_api/releases | ||
[build-shield]: https://github.com/bendikrb/podplay_api/actions/workflows/tests.yaml/badge.svg | ||
[build]: https://github.com/bendikrb/podplay_api/actions/workflows/tests.yaml | ||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg | ||
[py-versions-shield]: https://img.shields.io/pypi/pyversions/podplay-api | ||
[py-versions]: https://pypi.org/project/podplay-api/ | ||
[codecov-shield]: https://codecov.io/gh/bendikrb/podplay_api/graph/badge.svg?token=011O5N9MKL | ||
[codecov]: https://codecov.io/gh/bendikrb/podplay_api |