From 0229c0218cbfef76c8e06fb512a0aba1c1f39c99 Mon Sep 17 00:00:00 2001 From: "Bendik R. Brenne" Date: Sun, 15 Sep 2024 12:29:32 +0200 Subject: [PATCH] Add README and LICENSE --- LICENSE.md | 21 +++++++++++++ README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..dd67d23 --- /dev/null +++ b/LICENSE.md @@ -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. diff --git a/README.md b/README.md index f1308e1..7de043b 100644 --- a/README.md +++ b/README.md @@ -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