radiojavanapi 0.6.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/LICENSE +21 -21
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/PKG-INFO +24 -10
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/README.md +80 -80
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/constants.py +2 -2
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/browse.py +0 -9
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/private.py +1 -1
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/user.py +110 -110
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/models.py +232 -232
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi.egg-info/PKG-INFO +24 -10
- radiojavanapi-0.7.0/radiojavanapi.egg-info/requires.txt +4 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/setup.py +7 -4
- radiojavanapi-0.6.0/radiojavanapi.egg-info/requires.txt +0 -4
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/__init__.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/exceptions.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/extractors.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/helper.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/__init__.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/account.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/album.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/artist.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/auth.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/playlist.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/podcast.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/search.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/song.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/story.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi/mixins/video.py +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi.egg-info/SOURCES.txt +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi.egg-info/dependency_links.txt +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/radiojavanapi.egg-info/top_level.txt +0 -0
- {radiojavanapi-0.6.0 → radiojavanapi-0.7.0}/setup.cfg +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 xHossein
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 xHossein
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: radiojavanapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Fast and effective RadioJavan API Wrapper
|
|
5
5
|
Home-page: https://github.com/xHossein/radiojavanapi
|
|
6
6
|
Author: xHossein
|
|
@@ -16,24 +16,38 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
22
|
Requires-Python: >=3.7
|
|
20
23
|
Description-Content-Type: text/markdown
|
|
21
24
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: requests==2.
|
|
23
|
-
Requires-Dist: requests-toolbelt==0.
|
|
25
|
+
Requires-Dist: requests==2.34.2
|
|
26
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
24
27
|
Requires-Dist: PySocks==1.7.1
|
|
25
|
-
Requires-Dist: pydantic==2.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
Requires-Dist: pydantic==2.13.4
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+

|
|
43
|
+

|
|
30
44
|
|
|
31
45
|
# radiojavanapi
|
|
32
46
|
**radiojavanapi** is a Python library and wrapper for RadioJavan's API, enabling developers to create bots, streaming applications, download tools, and automation scripts with minimal effort.
|
|
33
47
|
|
|
34
48
|
Support Python >= 3.7
|
|
35
49
|
|
|
36
|
-
RadioJavan API valid for
|
|
50
|
+
RadioJavan API valid for 3 August 2026 (last reverse-engineering check)
|
|
37
51
|
|
|
38
52
|
## Features
|
|
39
53
|
* Get full info of a Song, Video, Podcast, Story, Playlist, Artist, Album, User and your Account
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# radiojavanapi
|
|
6
|
-
**radiojavanapi** is a Python library and wrapper for RadioJavan's API, enabling developers to create bots, streaming applications, download tools, and automation scripts with minimal effort.
|
|
7
|
-
|
|
8
|
-
Support Python >= 3.7
|
|
9
|
-
|
|
10
|
-
RadioJavan API valid for
|
|
11
|
-
|
|
12
|
-
## Features
|
|
13
|
-
* Get full info of a Song, Video, Podcast, Story, Playlist, Artist, Album, User and your Account
|
|
14
|
-
* Login by email and password
|
|
15
|
-
* Sign up to RadioJavan
|
|
16
|
-
* Like and Unlike a Song, Video, Podcast and Story
|
|
17
|
-
* Follow and Unfollow a Artist, User or MusicPlaylist
|
|
18
|
-
* Get followers and following of a user
|
|
19
|
-
* Create, Rename and Delete a playlist
|
|
20
|
-
* Add song or video to playlist or Remove from it
|
|
21
|
-
* Edit and Deactive account
|
|
22
|
-
* Upload and Remove profile photo
|
|
23
|
-
* Search and get trending, popular and ... medias\
|
|
24
|
-
and much more else
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
**From PyPI**
|
|
28
|
-
```
|
|
29
|
-
pip install radiojavanapi
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**From Github**
|
|
33
|
-
```
|
|
34
|
-
pip install git+https://github.com/xHossein/radiojavanapi@master
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Basic Usage
|
|
38
|
-
|
|
39
|
-
```python
|
|
40
|
-
from radiojavanapi import Client
|
|
41
|
-
|
|
42
|
-
# Create a Client instance and get a song info.
|
|
43
|
-
client = Client()
|
|
44
|
-
song = client.get_song_by_url(
|
|
45
|
-
'https://play.radiojavan.com/song/sijal-baz-mirim-baham-(ft-sami-low)')
|
|
46
|
-
|
|
47
|
-
print(f"""
|
|
48
|
-
Name: {song.name}
|
|
49
|
-
Artist: {song.artist}
|
|
50
|
-
HQ-Link: {song.hq_link}
|
|
51
|
-
""")
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
<details>
|
|
55
|
-
<summary>Show Output</summary>
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Name: Baz Mirim Baham (Ft Sami Low)
|
|
59
|
-
Artist: Sijal
|
|
60
|
-
HQ-Link: https://host2.mediacon-rj.app/media/mp3/aac-256/99926-cf9dd3814907dbb.m4a
|
|
61
|
-
```
|
|
62
|
-
</details>
|
|
63
|
-
|
|
64
|
-
## Documentation
|
|
65
|
-
You can find the documentation [here](https://xhossein.github.io/radiojavanapi/).
|
|
66
|
-
|
|
67
|
-
## Support
|
|
68
|
-
|
|
69
|
-
- Create a [GitHub issue](https://github.com/xHossein/radiojavanapi/issues) for bug reports, feature requests, or questions
|
|
70
|
-
- Add a ⭐️ [star on GitHub](https://github.com/xHossein/radiojavanapi) to support the project!
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
## Contributing
|
|
74
|
-
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
|
75
|
-
|
|
76
|
-
## Changelog
|
|
77
|
-
You can find this repository's changelog [here](https://github.com/xHossein/radiojavanapi/blob/master/CHANGELOG.md).
|
|
78
|
-
|
|
79
|
-
## License
|
|
80
|
-
This project is licensed under the [MIT license](https://choosealicense.com/licenses/mit/).
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
# radiojavanapi
|
|
6
|
+
**radiojavanapi** is a Python library and wrapper for RadioJavan's API, enabling developers to create bots, streaming applications, download tools, and automation scripts with minimal effort.
|
|
7
|
+
|
|
8
|
+
Support Python >= 3.7
|
|
9
|
+
|
|
10
|
+
RadioJavan API valid for 3 August 2026 (last reverse-engineering check)
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
* Get full info of a Song, Video, Podcast, Story, Playlist, Artist, Album, User and your Account
|
|
14
|
+
* Login by email and password
|
|
15
|
+
* Sign up to RadioJavan
|
|
16
|
+
* Like and Unlike a Song, Video, Podcast and Story
|
|
17
|
+
* Follow and Unfollow a Artist, User or MusicPlaylist
|
|
18
|
+
* Get followers and following of a user
|
|
19
|
+
* Create, Rename and Delete a playlist
|
|
20
|
+
* Add song or video to playlist or Remove from it
|
|
21
|
+
* Edit and Deactive account
|
|
22
|
+
* Upload and Remove profile photo
|
|
23
|
+
* Search and get trending, popular and ... medias\
|
|
24
|
+
and much more else
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
**From PyPI**
|
|
28
|
+
```
|
|
29
|
+
pip install radiojavanapi
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**From Github**
|
|
33
|
+
```
|
|
34
|
+
pip install git+https://github.com/xHossein/radiojavanapi@master
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Basic Usage
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from radiojavanapi import Client
|
|
41
|
+
|
|
42
|
+
# Create a Client instance and get a song info.
|
|
43
|
+
client = Client()
|
|
44
|
+
song = client.get_song_by_url(
|
|
45
|
+
'https://play.radiojavan.com/song/sijal-baz-mirim-baham-(ft-sami-low)')
|
|
46
|
+
|
|
47
|
+
print(f"""
|
|
48
|
+
Name: {song.name}
|
|
49
|
+
Artist: {song.artist}
|
|
50
|
+
HQ-Link: {song.hq_link}
|
|
51
|
+
""")
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
<details>
|
|
55
|
+
<summary>Show Output</summary>
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Name: Baz Mirim Baham (Ft Sami Low)
|
|
59
|
+
Artist: Sijal
|
|
60
|
+
HQ-Link: https://host2.mediacon-rj.app/media/mp3/aac-256/99926-cf9dd3814907dbb.m4a
|
|
61
|
+
```
|
|
62
|
+
</details>
|
|
63
|
+
|
|
64
|
+
## Documentation
|
|
65
|
+
You can find the documentation [here](https://xhossein.github.io/radiojavanapi/).
|
|
66
|
+
|
|
67
|
+
## Support
|
|
68
|
+
|
|
69
|
+
- Create a [GitHub issue](https://github.com/xHossein/radiojavanapi/issues) for bug reports, feature requests, or questions
|
|
70
|
+
- Add a ⭐️ [star on GitHub](https://github.com/xHossein/radiojavanapi) to support the project!
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## Contributing
|
|
74
|
+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
|
75
|
+
|
|
76
|
+
## Changelog
|
|
77
|
+
You can find this repository's changelog [here](https://github.com/xHossein/radiojavanapi/blob/master/CHANGELOG.md).
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
This project is licensed under the [MIT license](https://choosealicense.com/licenses/mit/).
|
|
@@ -6,6 +6,6 @@ BASE_HEADERS = {
|
|
|
6
6
|
'Accept-Encoding': 'gzip, deflate',
|
|
7
7
|
'Host': 'rj-deskcloud.com',
|
|
8
8
|
'Connection': 'keep-alive',
|
|
9
|
-
'x-rj-user-agent': 'Radio Javan/
|
|
10
|
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RadioJavan/
|
|
9
|
+
'x-rj-user-agent': 'Radio Javan/5.0.0 (Desktop) com.radioJavan.rj.desktop',
|
|
10
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RadioJavan/5.2.0 Chrome/130.0.6723.118 Electron/33.2.0 Safari/537.36',
|
|
11
11
|
}
|
|
@@ -84,15 +84,6 @@ class BrowseMixin(ArtistMixin, AlbumMixin):
|
|
|
84
84
|
"""Get list of shows podcasts"""
|
|
85
85
|
return self.__browse_req__('podcasts','shows')
|
|
86
86
|
|
|
87
|
-
def get_radio_stream(self) -> Dict:
|
|
88
|
-
"""Get RJ radio stream links and short data of current and next songs"""
|
|
89
|
-
songs = self.private_request('radio_nowplaying').json()
|
|
90
|
-
return {
|
|
91
|
-
'links': self.private_request('streams').json(),
|
|
92
|
-
'current_song': songs[0],
|
|
93
|
-
'next_songs': songs[1:]
|
|
94
|
-
}
|
|
95
|
-
|
|
96
87
|
def get_tv_stream(self) -> str:
|
|
97
88
|
"""Get RJ tv stream link"""
|
|
98
89
|
return self.private_request('app_config').json()['config']['tv']['hls']
|
|
@@ -59,7 +59,7 @@ class PrivateRequest():
|
|
|
59
59
|
if msg:
|
|
60
60
|
if 'is too long' in msg:
|
|
61
61
|
raise LongString(msg)
|
|
62
|
-
elif 'Invalid email' in msg:
|
|
62
|
+
elif 'Invalid email' in msg or 'The email or password doesn\'t look right' in msg:
|
|
63
63
|
raise BadCredentials(msg)
|
|
64
64
|
elif 'only contain letters' in msg:
|
|
65
65
|
raise InvalidName(msg)
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
from radiojavanapi.mixins.private import PrivateRequest
|
|
2
|
-
from radiojavanapi.extractors import extract_short_user, extract_user
|
|
3
|
-
from radiojavanapi.models import ShortUser, User
|
|
4
|
-
from radiojavanapi.helper import url_to_id
|
|
5
|
-
|
|
6
|
-
from pydantic import HttpUrl
|
|
7
|
-
from typing import List
|
|
8
|
-
|
|
9
|
-
class UserMixin(PrivateRequest):
|
|
10
|
-
def get_user_by_url(self, url: HttpUrl) -> User:
|
|
11
|
-
"""
|
|
12
|
-
Get user info by site url (e.g. `play.radiojavan.com/u/...` or `play.radiojavan.com/redirect?r=radiojavan://user/...`)
|
|
13
|
-
|
|
14
|
-
Arguments
|
|
15
|
-
----------
|
|
16
|
-
url: Site url of user
|
|
17
|
-
|
|
18
|
-
Returns
|
|
19
|
-
-------
|
|
20
|
-
User: An object of User type
|
|
21
|
-
|
|
22
|
-
"""
|
|
23
|
-
return self.get_user_by_username(url_to_id(url))
|
|
24
|
-
|
|
25
|
-
def get_user_by_username(self, username: str) -> User:
|
|
26
|
-
"""
|
|
27
|
-
Get user info by usename
|
|
28
|
-
|
|
29
|
-
Arguments
|
|
30
|
-
----------
|
|
31
|
-
username: username of user
|
|
32
|
-
|
|
33
|
-
Returns
|
|
34
|
-
-------
|
|
35
|
-
User: An object of User type
|
|
36
|
-
|
|
37
|
-
"""
|
|
38
|
-
response = self.private_request(
|
|
39
|
-
'user_profile', params=f'stats=1&username={username}').json()
|
|
40
|
-
return extract_user(response)
|
|
41
|
-
|
|
42
|
-
def get_user_followers(self, username: str) -> List[ShortUser]:
|
|
43
|
-
"""
|
|
44
|
-
Get user followers list
|
|
45
|
-
|
|
46
|
-
Arguments
|
|
47
|
-
----------
|
|
48
|
-
username: username of user
|
|
49
|
-
|
|
50
|
-
Returns
|
|
51
|
-
-------
|
|
52
|
-
List[ShortUser]: list of user followers as ShortUser object
|
|
53
|
-
|
|
54
|
-
"""
|
|
55
|
-
response = self.private_request(
|
|
56
|
-
'user_followers_list', params=f'username={username}').json()
|
|
57
|
-
return [extract_short_user(user) for user in response]
|
|
58
|
-
|
|
59
|
-
def get_user_following(self, username: str) -> List[ShortUser]:
|
|
60
|
-
"""
|
|
61
|
-
Get user following list
|
|
62
|
-
|
|
63
|
-
Arguments
|
|
64
|
-
----------
|
|
65
|
-
username: username of user
|
|
66
|
-
|
|
67
|
-
Returns
|
|
68
|
-
-------
|
|
69
|
-
List[ShortUser]: list of user following as ShortUser object
|
|
70
|
-
|
|
71
|
-
"""
|
|
72
|
-
response = self.private_request(
|
|
73
|
-
'user_following_list', params=f'username={username}').json()
|
|
74
|
-
return [extract_short_user(user) for user in response]
|
|
75
|
-
|
|
76
|
-
def follow_user(self, username: str) -> bool:
|
|
77
|
-
"""
|
|
78
|
-
Follow a user
|
|
79
|
-
|
|
80
|
-
Arguments
|
|
81
|
-
----------
|
|
82
|
-
username: username of user
|
|
83
|
-
|
|
84
|
-
Returns
|
|
85
|
-
-------
|
|
86
|
-
bool: RJ api result
|
|
87
|
-
|
|
88
|
-
"""
|
|
89
|
-
response = self.private_request('user_follow',
|
|
90
|
-
json={"username":username},
|
|
91
|
-
need_login=True).json()
|
|
92
|
-
return response['success'] == True
|
|
93
|
-
|
|
94
|
-
def unfollow_user(self, username: str) -> bool:
|
|
95
|
-
"""
|
|
96
|
-
UnFollow a user
|
|
97
|
-
|
|
98
|
-
Arguments
|
|
99
|
-
----------
|
|
100
|
-
username: username of user
|
|
101
|
-
|
|
102
|
-
Returns
|
|
103
|
-
-------
|
|
104
|
-
bool: RJ api result
|
|
105
|
-
|
|
106
|
-
"""
|
|
107
|
-
response = self.private_request('user_unfollow',
|
|
108
|
-
json={"username":username},
|
|
109
|
-
need_login=True).json()
|
|
110
|
-
return response['success'] == True
|
|
1
|
+
from radiojavanapi.mixins.private import PrivateRequest
|
|
2
|
+
from radiojavanapi.extractors import extract_short_user, extract_user
|
|
3
|
+
from radiojavanapi.models import ShortUser, User
|
|
4
|
+
from radiojavanapi.helper import url_to_id
|
|
5
|
+
|
|
6
|
+
from pydantic import HttpUrl
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
9
|
+
class UserMixin(PrivateRequest):
|
|
10
|
+
def get_user_by_url(self, url: HttpUrl) -> User:
|
|
11
|
+
"""
|
|
12
|
+
Get user info by site url (e.g. `play.radiojavan.com/u/...` or `play.radiojavan.com/redirect?r=radiojavan://user/...`)
|
|
13
|
+
|
|
14
|
+
Arguments
|
|
15
|
+
----------
|
|
16
|
+
url: Site url of user
|
|
17
|
+
|
|
18
|
+
Returns
|
|
19
|
+
-------
|
|
20
|
+
User: An object of User type
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
return self.get_user_by_username(url_to_id(url))
|
|
24
|
+
|
|
25
|
+
def get_user_by_username(self, username: str) -> User:
|
|
26
|
+
"""
|
|
27
|
+
Get user info by usename
|
|
28
|
+
|
|
29
|
+
Arguments
|
|
30
|
+
----------
|
|
31
|
+
username: username of user
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
-------
|
|
35
|
+
User: An object of User type
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
response = self.private_request(
|
|
39
|
+
'user_profile', params=f'stats=1&username={username}').json()
|
|
40
|
+
return extract_user(response)
|
|
41
|
+
|
|
42
|
+
def get_user_followers(self, username: str) -> List[ShortUser]:
|
|
43
|
+
"""
|
|
44
|
+
Get user followers list
|
|
45
|
+
|
|
46
|
+
Arguments
|
|
47
|
+
----------
|
|
48
|
+
username: username of user
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
List[ShortUser]: list of user followers as ShortUser object
|
|
53
|
+
|
|
54
|
+
"""
|
|
55
|
+
response = self.private_request(
|
|
56
|
+
'user_followers_list', params=f'username={username}').json()
|
|
57
|
+
return [extract_short_user(user) for user in response]
|
|
58
|
+
|
|
59
|
+
def get_user_following(self, username: str) -> List[ShortUser]:
|
|
60
|
+
"""
|
|
61
|
+
Get user following list
|
|
62
|
+
|
|
63
|
+
Arguments
|
|
64
|
+
----------
|
|
65
|
+
username: username of user
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
List[ShortUser]: list of user following as ShortUser object
|
|
70
|
+
|
|
71
|
+
"""
|
|
72
|
+
response = self.private_request(
|
|
73
|
+
'user_following_list', params=f'username={username}').json()
|
|
74
|
+
return [extract_short_user(user) for user in response]
|
|
75
|
+
|
|
76
|
+
def follow_user(self, username: str) -> bool:
|
|
77
|
+
"""
|
|
78
|
+
Follow a user
|
|
79
|
+
|
|
80
|
+
Arguments
|
|
81
|
+
----------
|
|
82
|
+
username: username of user
|
|
83
|
+
|
|
84
|
+
Returns
|
|
85
|
+
-------
|
|
86
|
+
bool: RJ api result
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
response = self.private_request('user_follow',
|
|
90
|
+
json={"username":username},
|
|
91
|
+
need_login=True).json()
|
|
92
|
+
return response['success'] == True
|
|
93
|
+
|
|
94
|
+
def unfollow_user(self, username: str) -> bool:
|
|
95
|
+
"""
|
|
96
|
+
UnFollow a user
|
|
97
|
+
|
|
98
|
+
Arguments
|
|
99
|
+
----------
|
|
100
|
+
username: username of user
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
bool: RJ api result
|
|
105
|
+
|
|
106
|
+
"""
|
|
107
|
+
response = self.private_request('user_unfollow',
|
|
108
|
+
json={"username":username},
|
|
109
|
+
need_login=True).json()
|
|
110
|
+
return response['success'] == True
|
|
@@ -1,232 +1,232 @@
|
|
|
1
|
-
from typing import List, Optional, Union
|
|
2
|
-
from pydantic import BaseModel, HttpUrl
|
|
3
|
-
|
|
4
|
-
class ShortUser(BaseModel):
|
|
5
|
-
thumbnail: HttpUrl
|
|
6
|
-
username: Optional[str] = None
|
|
7
|
-
display_name: str
|
|
8
|
-
share_link: Optional[HttpUrl] = None
|
|
9
|
-
|
|
10
|
-
class ShortData(BaseModel):
|
|
11
|
-
id: Union[int, str]
|
|
12
|
-
artist: Optional[str] = ""
|
|
13
|
-
name: Optional[str] = ""
|
|
14
|
-
created_at: str
|
|
15
|
-
permlink: Optional[str] = ""
|
|
16
|
-
photo: HttpUrl
|
|
17
|
-
photo_player: Optional[HttpUrl] = ""
|
|
18
|
-
share_link: HttpUrl
|
|
19
|
-
title: str
|
|
20
|
-
|
|
21
|
-
class MyPlaylists(BaseModel):
|
|
22
|
-
music_playlists: List[ShortData] = []
|
|
23
|
-
video_playlists: List[ShortData] = []
|
|
24
|
-
|
|
25
|
-
class Story(BaseModel):
|
|
26
|
-
id: int
|
|
27
|
-
hash_id: str
|
|
28
|
-
title: str
|
|
29
|
-
song: str
|
|
30
|
-
song_id: int
|
|
31
|
-
artist: str
|
|
32
|
-
link: HttpUrl
|
|
33
|
-
lq_link: HttpUrl
|
|
34
|
-
hq_link: HttpUrl
|
|
35
|
-
filename: str
|
|
36
|
-
share_link: HttpUrl
|
|
37
|
-
photo: HttpUrl
|
|
38
|
-
thumbnail: HttpUrl
|
|
39
|
-
is_verified: bool
|
|
40
|
-
likes: str
|
|
41
|
-
likes_pretty: str
|
|
42
|
-
user: ShortUser
|
|
43
|
-
location: str
|
|
44
|
-
is_my_story: Optional[bool] = False
|
|
45
|
-
|
|
46
|
-
class User(BaseModel):
|
|
47
|
-
name: str
|
|
48
|
-
firstname: str
|
|
49
|
-
lastname: str
|
|
50
|
-
display_name: Optional[str] = ""
|
|
51
|
-
username: Optional[str] = ""
|
|
52
|
-
share_link: HttpUrl
|
|
53
|
-
display_name: Optional[str] = ""
|
|
54
|
-
bio: Optional[str] = ""
|
|
55
|
-
default_photo: HttpUrl
|
|
56
|
-
default_thumbnail: HttpUrl
|
|
57
|
-
photo: HttpUrl
|
|
58
|
-
has_custom_photo: bool
|
|
59
|
-
thumbnail: HttpUrl
|
|
60
|
-
followers_count: str
|
|
61
|
-
following_count: str
|
|
62
|
-
has_subscription : bool
|
|
63
|
-
is_verified: bool
|
|
64
|
-
following: bool
|
|
65
|
-
playlists_count: int
|
|
66
|
-
songs_count: int
|
|
67
|
-
artists_count: int
|
|
68
|
-
artists_name: List[str] = []
|
|
69
|
-
stories: List[Story] = []
|
|
70
|
-
music_playlists: List[ShortData] = []
|
|
71
|
-
|
|
72
|
-
class Account(BaseModel):
|
|
73
|
-
name: str
|
|
74
|
-
firstname: str
|
|
75
|
-
lastname: str
|
|
76
|
-
display_name: str
|
|
77
|
-
username: str
|
|
78
|
-
share_link: HttpUrl
|
|
79
|
-
email: str
|
|
80
|
-
bio: Optional[str] = ""
|
|
81
|
-
default_photo: HttpUrl
|
|
82
|
-
default_thumbnail: HttpUrl
|
|
83
|
-
has_subscription : bool
|
|
84
|
-
has_custom_photo : bool
|
|
85
|
-
is_verified: bool
|
|
86
|
-
photo: HttpUrl
|
|
87
|
-
thumbnail: HttpUrl
|
|
88
|
-
followers_count: str
|
|
89
|
-
following_count: str
|
|
90
|
-
playlists_count: int
|
|
91
|
-
songs_count: int
|
|
92
|
-
artists_count : int
|
|
93
|
-
stories: List[Story] = []
|
|
94
|
-
artists_name: List[str] = []
|
|
95
|
-
|
|
96
|
-
class RJBaseModel(BaseModel):
|
|
97
|
-
created_at: str
|
|
98
|
-
credit_tags: List[str] = []
|
|
99
|
-
dislikes: int
|
|
100
|
-
hq_hls: Optional[HttpUrl] = ""
|
|
101
|
-
hq_link: HttpUrl
|
|
102
|
-
id: int
|
|
103
|
-
likes: int
|
|
104
|
-
link: HttpUrl
|
|
105
|
-
lq_hls: Optional[HttpUrl] = ""
|
|
106
|
-
lq_link: HttpUrl
|
|
107
|
-
permlink: str
|
|
108
|
-
photo: HttpUrl
|
|
109
|
-
photo_player: Optional[HttpUrl] = ""
|
|
110
|
-
share_link: HttpUrl
|
|
111
|
-
title: str
|
|
112
|
-
|
|
113
|
-
class Song(RJBaseModel):
|
|
114
|
-
artist: str
|
|
115
|
-
name: str
|
|
116
|
-
item: Optional[Union[str, int]] = [] # for playlist
|
|
117
|
-
album: Optional[str] = ""
|
|
118
|
-
date: Optional[str] = ""
|
|
119
|
-
duration: float
|
|
120
|
-
hls_link: Optional[HttpUrl] = ""
|
|
121
|
-
thumbnail: HttpUrl
|
|
122
|
-
plays: int
|
|
123
|
-
downloads: int
|
|
124
|
-
credits: Optional[str] = ""
|
|
125
|
-
artist_tags: List[str] = []
|
|
126
|
-
lyric: Optional[str] = ""
|
|
127
|
-
related_songs: List[ShortData] = []
|
|
128
|
-
stories: List[Story] = []
|
|
129
|
-
|
|
130
|
-
class Video(RJBaseModel):
|
|
131
|
-
artist: str
|
|
132
|
-
name: str
|
|
133
|
-
item: Optional[Union[str, int]] = [] # for playlist
|
|
134
|
-
date: Optional[str] = ""
|
|
135
|
-
views: int
|
|
136
|
-
artist_tags: List[str] = []
|
|
137
|
-
related_videos: List[ShortData] = []
|
|
138
|
-
|
|
139
|
-
class Podcast(RJBaseModel):
|
|
140
|
-
date: str
|
|
141
|
-
short_date: str
|
|
142
|
-
is_talk: bool
|
|
143
|
-
duration: float
|
|
144
|
-
hls_link: Optional[HttpUrl] = ""
|
|
145
|
-
thumbnail: HttpUrl
|
|
146
|
-
plays: int
|
|
147
|
-
show_permlink: Optional[str] = ""
|
|
148
|
-
tracklist: Optional[str] = []
|
|
149
|
-
related_podcasts: List[ShortData] = []
|
|
150
|
-
|
|
151
|
-
class Artist(BaseModel):
|
|
152
|
-
name: str
|
|
153
|
-
background: HttpUrl
|
|
154
|
-
photo: HttpUrl
|
|
155
|
-
photo_player: HttpUrl
|
|
156
|
-
photo_thumbnail: HttpUrl
|
|
157
|
-
share_link: HttpUrl
|
|
158
|
-
prereleases: List = []
|
|
159
|
-
events: List = []
|
|
160
|
-
photos: List = []
|
|
161
|
-
latest_song: Optional[ShortData]
|
|
162
|
-
followers_count: int
|
|
163
|
-
following: bool
|
|
164
|
-
plays: str
|
|
165
|
-
songs: List[ShortData] = []
|
|
166
|
-
albums: List[ShortData] = []
|
|
167
|
-
videos: List[ShortData] = []
|
|
168
|
-
podcasts: List[ShortData] = []
|
|
169
|
-
music_playlists: List[ShortData] = []
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
class SearchResults(BaseModel):
|
|
173
|
-
query: str
|
|
174
|
-
songs: List[ShortData] = []
|
|
175
|
-
albums: List[ShortData] = []
|
|
176
|
-
videos: List[ShortData] = []
|
|
177
|
-
podcasts: List[ShortData] = []
|
|
178
|
-
music_playlists: List[ShortData] = []
|
|
179
|
-
shows: List[ShortData] = []
|
|
180
|
-
users: List[ShortUser] = []
|
|
181
|
-
artist_names: List[str] = []
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
class MusicPlaylist(BaseModel):
|
|
185
|
-
id: str
|
|
186
|
-
title: str
|
|
187
|
-
count: int
|
|
188
|
-
created_at: str
|
|
189
|
-
created_by: str
|
|
190
|
-
last_updated_at: str
|
|
191
|
-
share_link: HttpUrl
|
|
192
|
-
followers: int
|
|
193
|
-
following: Optional[bool] = False # login required
|
|
194
|
-
sync: Optional[bool] = False # login required
|
|
195
|
-
is_public: bool
|
|
196
|
-
is_my_playlist: bool
|
|
197
|
-
photo: HttpUrl
|
|
198
|
-
has_custom_photo: bool
|
|
199
|
-
photo_player: Optional[HttpUrl] = ""
|
|
200
|
-
thumbnail: HttpUrl
|
|
201
|
-
songs: List[Song] = []
|
|
202
|
-
|
|
203
|
-
class VideoPlaylist(BaseModel):
|
|
204
|
-
id: str
|
|
205
|
-
title: str
|
|
206
|
-
count: int
|
|
207
|
-
created_at: str
|
|
208
|
-
last_updated_at: str
|
|
209
|
-
share_link: HttpUrl
|
|
210
|
-
is_my_playlist: bool
|
|
211
|
-
photo: HttpUrl
|
|
212
|
-
photo_player: Optional[HttpUrl] = ""
|
|
213
|
-
thumbnail: HttpUrl
|
|
214
|
-
videos: List[Video] = []
|
|
215
|
-
|
|
216
|
-
class Album(BaseModel):
|
|
217
|
-
id: Union[str, int]
|
|
218
|
-
created_at: str
|
|
219
|
-
date: str
|
|
220
|
-
tracks: List[Song] = []
|
|
221
|
-
name: str
|
|
222
|
-
artist: str
|
|
223
|
-
share_link: HttpUrl
|
|
224
|
-
|
|
225
|
-
class NotificationsStatus(BaseModel):
|
|
226
|
-
artists_email: bool
|
|
227
|
-
artists_push: bool
|
|
228
|
-
events_push: bool
|
|
229
|
-
music_email: bool
|
|
230
|
-
music_push: bool
|
|
231
|
-
playlists_followers_push: bool
|
|
232
|
-
selfies_push: bool
|
|
1
|
+
from typing import List, Optional, Union
|
|
2
|
+
from pydantic import BaseModel, HttpUrl
|
|
3
|
+
|
|
4
|
+
class ShortUser(BaseModel):
|
|
5
|
+
thumbnail: HttpUrl
|
|
6
|
+
username: Optional[str] = None
|
|
7
|
+
display_name: str
|
|
8
|
+
share_link: Optional[HttpUrl] = None
|
|
9
|
+
|
|
10
|
+
class ShortData(BaseModel):
|
|
11
|
+
id: Union[int, str]
|
|
12
|
+
artist: Optional[str] = ""
|
|
13
|
+
name: Optional[str] = ""
|
|
14
|
+
created_at: str
|
|
15
|
+
permlink: Optional[str] = ""
|
|
16
|
+
photo: HttpUrl
|
|
17
|
+
photo_player: Optional[HttpUrl] = ""
|
|
18
|
+
share_link: HttpUrl
|
|
19
|
+
title: str
|
|
20
|
+
|
|
21
|
+
class MyPlaylists(BaseModel):
|
|
22
|
+
music_playlists: List[ShortData] = []
|
|
23
|
+
video_playlists: List[ShortData] = []
|
|
24
|
+
|
|
25
|
+
class Story(BaseModel):
|
|
26
|
+
id: int
|
|
27
|
+
hash_id: str
|
|
28
|
+
title: str
|
|
29
|
+
song: str
|
|
30
|
+
song_id: int
|
|
31
|
+
artist: str
|
|
32
|
+
link: HttpUrl
|
|
33
|
+
lq_link: HttpUrl
|
|
34
|
+
hq_link: HttpUrl
|
|
35
|
+
filename: str
|
|
36
|
+
share_link: HttpUrl
|
|
37
|
+
photo: HttpUrl
|
|
38
|
+
thumbnail: HttpUrl
|
|
39
|
+
is_verified: bool
|
|
40
|
+
likes: str
|
|
41
|
+
likes_pretty: str
|
|
42
|
+
user: ShortUser
|
|
43
|
+
location: str
|
|
44
|
+
is_my_story: Optional[bool] = False
|
|
45
|
+
|
|
46
|
+
class User(BaseModel):
|
|
47
|
+
name: str
|
|
48
|
+
firstname: str
|
|
49
|
+
lastname: str
|
|
50
|
+
display_name: Optional[str] = ""
|
|
51
|
+
username: Optional[str] = ""
|
|
52
|
+
share_link: HttpUrl
|
|
53
|
+
display_name: Optional[str] = ""
|
|
54
|
+
bio: Optional[str] = ""
|
|
55
|
+
default_photo: HttpUrl
|
|
56
|
+
default_thumbnail: HttpUrl
|
|
57
|
+
photo: HttpUrl
|
|
58
|
+
has_custom_photo: bool
|
|
59
|
+
thumbnail: HttpUrl
|
|
60
|
+
followers_count: str
|
|
61
|
+
following_count: str
|
|
62
|
+
has_subscription : bool
|
|
63
|
+
is_verified: bool
|
|
64
|
+
following: bool
|
|
65
|
+
playlists_count: int
|
|
66
|
+
songs_count: int
|
|
67
|
+
artists_count: int
|
|
68
|
+
artists_name: List[str] = []
|
|
69
|
+
stories: List[Story] = []
|
|
70
|
+
music_playlists: List[ShortData] = []
|
|
71
|
+
|
|
72
|
+
class Account(BaseModel):
|
|
73
|
+
name: str
|
|
74
|
+
firstname: str
|
|
75
|
+
lastname: str
|
|
76
|
+
display_name: str
|
|
77
|
+
username: str
|
|
78
|
+
share_link: HttpUrl
|
|
79
|
+
email: str
|
|
80
|
+
bio: Optional[str] = ""
|
|
81
|
+
default_photo: HttpUrl
|
|
82
|
+
default_thumbnail: HttpUrl
|
|
83
|
+
has_subscription : bool
|
|
84
|
+
has_custom_photo : bool
|
|
85
|
+
is_verified: bool
|
|
86
|
+
photo: HttpUrl
|
|
87
|
+
thumbnail: HttpUrl
|
|
88
|
+
followers_count: str
|
|
89
|
+
following_count: str
|
|
90
|
+
playlists_count: int
|
|
91
|
+
songs_count: int
|
|
92
|
+
artists_count : int
|
|
93
|
+
stories: List[Story] = []
|
|
94
|
+
artists_name: List[str] = []
|
|
95
|
+
|
|
96
|
+
class RJBaseModel(BaseModel):
|
|
97
|
+
created_at: str
|
|
98
|
+
credit_tags: List[str] = []
|
|
99
|
+
dislikes: int
|
|
100
|
+
hq_hls: Optional[HttpUrl] = ""
|
|
101
|
+
hq_link: HttpUrl
|
|
102
|
+
id: int
|
|
103
|
+
likes: int
|
|
104
|
+
link: HttpUrl
|
|
105
|
+
lq_hls: Optional[HttpUrl] = ""
|
|
106
|
+
lq_link: HttpUrl
|
|
107
|
+
permlink: str
|
|
108
|
+
photo: HttpUrl
|
|
109
|
+
photo_player: Optional[HttpUrl] = ""
|
|
110
|
+
share_link: HttpUrl
|
|
111
|
+
title: str
|
|
112
|
+
|
|
113
|
+
class Song(RJBaseModel):
|
|
114
|
+
artist: str
|
|
115
|
+
name: str
|
|
116
|
+
item: Optional[Union[str, int]] = [] # for playlist
|
|
117
|
+
album: Optional[str] = ""
|
|
118
|
+
date: Optional[str] = ""
|
|
119
|
+
duration: float
|
|
120
|
+
hls_link: Optional[HttpUrl] = ""
|
|
121
|
+
thumbnail: HttpUrl
|
|
122
|
+
plays: int
|
|
123
|
+
downloads: int
|
|
124
|
+
credits: Optional[str] = ""
|
|
125
|
+
artist_tags: List[str] = []
|
|
126
|
+
lyric: Optional[str] = ""
|
|
127
|
+
related_songs: List[ShortData] = []
|
|
128
|
+
stories: List[Story] = []
|
|
129
|
+
|
|
130
|
+
class Video(RJBaseModel):
|
|
131
|
+
artist: str
|
|
132
|
+
name: str
|
|
133
|
+
item: Optional[Union[str, int]] = [] # for playlist
|
|
134
|
+
date: Optional[str] = ""
|
|
135
|
+
views: int
|
|
136
|
+
artist_tags: List[str] = []
|
|
137
|
+
related_videos: List[ShortData] = []
|
|
138
|
+
|
|
139
|
+
class Podcast(RJBaseModel):
|
|
140
|
+
date: str
|
|
141
|
+
short_date: str
|
|
142
|
+
is_talk: bool
|
|
143
|
+
duration: float
|
|
144
|
+
hls_link: Optional[HttpUrl] = ""
|
|
145
|
+
thumbnail: HttpUrl
|
|
146
|
+
plays: int
|
|
147
|
+
show_permlink: Optional[str] = ""
|
|
148
|
+
tracklist: Optional[str] = []
|
|
149
|
+
related_podcasts: List[ShortData] = []
|
|
150
|
+
|
|
151
|
+
class Artist(BaseModel):
|
|
152
|
+
name: str
|
|
153
|
+
background: HttpUrl
|
|
154
|
+
photo: HttpUrl
|
|
155
|
+
photo_player: HttpUrl
|
|
156
|
+
photo_thumbnail: HttpUrl
|
|
157
|
+
share_link: HttpUrl
|
|
158
|
+
prereleases: List = []
|
|
159
|
+
events: List = []
|
|
160
|
+
photos: List = []
|
|
161
|
+
latest_song: Optional[ShortData]
|
|
162
|
+
followers_count: int
|
|
163
|
+
following: bool
|
|
164
|
+
plays: str
|
|
165
|
+
songs: List[ShortData] = []
|
|
166
|
+
albums: List[ShortData] = []
|
|
167
|
+
videos: List[ShortData] = []
|
|
168
|
+
podcasts: List[ShortData] = []
|
|
169
|
+
music_playlists: List[ShortData] = []
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class SearchResults(BaseModel):
|
|
173
|
+
query: str
|
|
174
|
+
songs: List[ShortData] = []
|
|
175
|
+
albums: List[ShortData] = []
|
|
176
|
+
videos: List[ShortData] = []
|
|
177
|
+
podcasts: List[ShortData] = []
|
|
178
|
+
music_playlists: List[ShortData] = []
|
|
179
|
+
shows: List[ShortData] = []
|
|
180
|
+
users: List[ShortUser] = []
|
|
181
|
+
artist_names: List[str] = []
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class MusicPlaylist(BaseModel):
|
|
185
|
+
id: str
|
|
186
|
+
title: str
|
|
187
|
+
count: int
|
|
188
|
+
created_at: str
|
|
189
|
+
created_by: str
|
|
190
|
+
last_updated_at: str
|
|
191
|
+
share_link: HttpUrl
|
|
192
|
+
followers: int
|
|
193
|
+
following: Optional[bool] = False # login required
|
|
194
|
+
sync: Optional[bool] = False # login required
|
|
195
|
+
is_public: bool
|
|
196
|
+
is_my_playlist: bool
|
|
197
|
+
photo: HttpUrl
|
|
198
|
+
has_custom_photo: bool
|
|
199
|
+
photo_player: Optional[HttpUrl] = ""
|
|
200
|
+
thumbnail: HttpUrl
|
|
201
|
+
songs: List[Song] = []
|
|
202
|
+
|
|
203
|
+
class VideoPlaylist(BaseModel):
|
|
204
|
+
id: str
|
|
205
|
+
title: str
|
|
206
|
+
count: int
|
|
207
|
+
created_at: str
|
|
208
|
+
last_updated_at: str
|
|
209
|
+
share_link: HttpUrl
|
|
210
|
+
is_my_playlist: bool
|
|
211
|
+
photo: HttpUrl
|
|
212
|
+
photo_player: Optional[HttpUrl] = ""
|
|
213
|
+
thumbnail: HttpUrl
|
|
214
|
+
videos: List[Video] = []
|
|
215
|
+
|
|
216
|
+
class Album(BaseModel):
|
|
217
|
+
id: Union[str, int]
|
|
218
|
+
created_at: str
|
|
219
|
+
date: str
|
|
220
|
+
tracks: List[Song] = []
|
|
221
|
+
name: str
|
|
222
|
+
artist: str
|
|
223
|
+
share_link: HttpUrl
|
|
224
|
+
|
|
225
|
+
class NotificationsStatus(BaseModel):
|
|
226
|
+
artists_email: bool
|
|
227
|
+
artists_push: bool
|
|
228
|
+
events_push: bool
|
|
229
|
+
music_email: bool
|
|
230
|
+
music_push: bool
|
|
231
|
+
playlists_followers_push: bool
|
|
232
|
+
selfies_push: bool
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: radiojavanapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Fast and effective RadioJavan API Wrapper
|
|
5
5
|
Home-page: https://github.com/xHossein/radiojavanapi
|
|
6
6
|
Author: xHossein
|
|
@@ -16,24 +16,38 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
22
|
Requires-Python: >=3.7
|
|
20
23
|
Description-Content-Type: text/markdown
|
|
21
24
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: requests==2.
|
|
23
|
-
Requires-Dist: requests-toolbelt==0.
|
|
25
|
+
Requires-Dist: requests==2.34.2
|
|
26
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
24
27
|
Requires-Dist: PySocks==1.7.1
|
|
25
|
-
Requires-Dist: pydantic==2.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
Requires-Dist: pydantic==2.13.4
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+

|
|
43
|
+

|
|
30
44
|
|
|
31
45
|
# radiojavanapi
|
|
32
46
|
**radiojavanapi** is a Python library and wrapper for RadioJavan's API, enabling developers to create bots, streaming applications, download tools, and automation scripts with minimal effort.
|
|
33
47
|
|
|
34
48
|
Support Python >= 3.7
|
|
35
49
|
|
|
36
|
-
RadioJavan API valid for
|
|
50
|
+
RadioJavan API valid for 3 August 2026 (last reverse-engineering check)
|
|
37
51
|
|
|
38
52
|
## Features
|
|
39
53
|
* Get full info of a Song, Video, Podcast, Story, Playlist, Artist, Album, User and your Account
|
|
@@ -5,15 +5,15 @@ HERE = pathlib.Path(__file__).parent
|
|
|
5
5
|
README = (HERE / "README.md").read_text(encoding='utf-8')
|
|
6
6
|
|
|
7
7
|
requirements = [
|
|
8
|
-
'requests==2.
|
|
9
|
-
'requests-toolbelt==0.
|
|
8
|
+
'requests==2.34.2',
|
|
9
|
+
'requests-toolbelt==1.0.0',
|
|
10
10
|
'PySocks==1.7.1',
|
|
11
|
-
'pydantic==2.
|
|
11
|
+
'pydantic==2.13.4'
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name='radiojavanapi',
|
|
16
|
-
version='0.
|
|
16
|
+
version='0.7.0',
|
|
17
17
|
author='xHossein',
|
|
18
18
|
license='MIT',
|
|
19
19
|
url='https://github.com/xHossein/radiojavanapi',
|
|
@@ -38,5 +38,8 @@ setup(
|
|
|
38
38
|
'Programming Language :: Python :: 3.10',
|
|
39
39
|
'Programming Language :: Python :: 3.11',
|
|
40
40
|
'Programming Language :: Python :: 3.12',
|
|
41
|
+
'Programming Language :: Python :: 3.13',
|
|
42
|
+
'Programming Language :: Python :: 3.14',
|
|
43
|
+
'Programming Language :: Python :: 3.15',
|
|
41
44
|
]
|
|
42
45
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|