https://github.com/bendikrb/nrk-psapi
Unofficial Python client for the NRK Podcast/Radio API
https://github.com/bendikrb/nrk-psapi
Last synced: 5 months ago
JSON representation
Unofficial Python client for the NRK Podcast/Radio API
- Host: GitHub
- URL: https://github.com/bendikrb/nrk-psapi
- Owner: bendikrb
- License: mit
- Created: 2024-07-23T13:33:24.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-10-24T05:12:57.000Z (8 months ago)
- Last Synced: 2024-10-24T15:52:51.612Z (8 months ago)
- Language: Python
- Homepage: https://nrk-psapi.readthedocs.io
- Size: 1010 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# nrk-psapi
[![GitHub Release][releases-shield]][releases]
[![Python Versions][py-versions-shield]][py-versions]
[![PyPI Downloads][downloads-shield]][downloads]
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE.md)
![Made with Love in Norway][madewithlove-shield][![Build Status][build-shield]][build]
[![Code coverage][codecov-shield]][codecov]Asynchronous Python client for the NRK Podcast/Radio API
## Installation
```bash
pip install nrk-psapi
```## Usage
The following are some basic examples of how to use the library.
Get information about a specific podcast:
```python
import asynciofrom nrk_psapi import NrkPodcastAPI
async def main():
"""Main function."""
async with NrkPodcastAPI() as client:
podcast = await client.get_podcast(podcast_id="desken_brenner")
print(podcast)if __name__ == "__main__":
asyncio.run(main())
```Get all episodes for a specific podcast:
```python
episodes = await client.get_podcast_episodes(podcast_id="desken_brenner")
for episode in episodes:
print(episode)
```Search for a specific podcast:
```python
search_results = await client.search(
query="Norsk", search_type=SearchResultType.PODCAST
)
for result in search_results.hits:
print(result)
```Get curated podcasts:
```python
curated_podcasts = await client.curated_podcasts()
for section in curated_podcasts.sections:
print(section)
for podcast in section.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
nrk-psapi 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/nrk-psapi.svg
[license]: https://github.com/bendikrb/nrk-psapi/blob/main/LICENSE
[releases-shield]: https://img.shields.io/pypi/v/nrk-psapi
[releases]: https://github.com/bendikrb/nrk-psapi/releases
[build-shield]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml/badge.svg
[build]: https://github.com/bendikrb/nrk-psapi/actions/workflows/test.yaml
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
[py-versions-shield]: https://img.shields.io/pypi/pyversions/nrk-psapi
[py-versions]: https://pypi.org/project/nrk-psapi/
[codecov-shield]: https://codecov.io/gh/bendikrb/nrk-psapi/graph/badge.svg?token=011O5N9MKL
[codecov]: https://codecov.io/gh/bendikrb/nrk-psapi
[madewithlove-shield]: https://madewithlove.now.sh/no?heart=true&colorB=%233584e4
[downloads-shield]: https://img.shields.io/pypi/dm/nrk-psapi?style=flat
[downloads]: https://pypistats.org/packages/nrk-psapi