Metadata-Version: 2.1
Name: zingmp3-api
Version: 1.0.0
Summary: Python wrapper for Zing MP3 API
Author: Vinh LC
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests

# zingmp3-api

Python wrapper for Zing MP3 API.

## Installation

```bash
pip install zingmp3-api
```

## Quick Start

```python
from zingmp3_api import ZingMp3

result = ZingMp3.search("sontungmtp")
print(result)
```

## Examples

### Search

```python
from zingmp3_api import ZingMp3

data = ZingMp3.search("sontungmtp")
print(data)
```

### Get Song Streaming URL

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_song("Z8U96AD8")
print(data)
```

### Get Song Information

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_info_song("Z8U96AD8")
print(data)
```

### Get Lyrics

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_lyric("Z8U96AD8")
print(data)
```

### Get Playlist Details

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_detail_playlist("Z8U96AD8")
print(data)
```

### Get Artist Information

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_artist("son-tung-mtp")
print(data)
```

### Get Home Page Data

```python
from zingmp3_api import ZingMp3

data = ZingMp3.get_home()
print(data)
```

## Available Methods

| Method | Description |
|----------|-------------|
| `get_song(song_id)` | Get streaming link for a song |
| `get_detail_playlist(playlist_id)` | Get detailed information and songs in a playlist |
| `get_home()` | Get data for the home page |
| `get_top100()` | Get Top 100 list |
| `get_chart_home()` | Get chart home data |
| `get_new_release_chart()` | Get new release chart |
| `get_info_song(song_id)` | Get basic information for a song |
| `get_list_artist_song(artist_id, page, count)` | Get list of songs by an artist |
| `get_artist(name)` | Get artist information by alias/name |
| `get_lyric(song_id)` | Get lyrics for a song |
| `search(name)` | Search for songs, artists, playlists, albums, videos |
| `get_list_mv(id, page, count)` | Get list of MVs by category/genre |
| `get_category_mv(id)` | Get info about a video category |
| `get_video(video_id)` | Get detailed information for a video/MV |

## Show Available Methods

```python
from zingmp3_api import ZingMp3

ZingMp3.help()
```

Output:

```text
Available methods in ZingMp3Api:
  - get_song(song_id)                         : Get streaming link for a song
  - get_detail_playlist(playlist_id)          : Get detailed information and songs in a playlist
  - get_home()                                : Get data for the home page
  - get_top100()                              : Get Top 100 list
  - get_chart_home()                          : Get chart home data
  - get_new_release_chart()                   : Get new release chart
  - get_info_song(song_id)                    : Get basic information for a song
  - get_list_artist_song(artist_id, page, count) : Get list of songs by an artist
  - get_artist(name)                          : Get artist information by alias/name
  - get_lyric(song_id)                        : Get lyrics for a song
  - search(name)                              : Search for songs, artists, playlists, etc
  - get_list_mv(id, page, count)              : Get list of MVs by category/genre
  - get_category_mv(id)                       : Get info about a video category
  - get_video(video_id)                       : Get detailed information for a video/MV
```

## Requirements

- Python 3.8+
- requests

## Install Dependencies

```bash
pip install requests
```

## Original code

[phamhiep2506](https://github.com/phamhiep2506/zingmp3-api-full)

## License

MIT License

## Disclaimer

This project is an unofficial wrapper for Zing MP3 APIs and is intended for educational and research purposes only.
