For Actions and Account methods, you must have an account.
Arguments:
| Name | Type | Description |
|---|---|---|
email |
str |
Your account email |
password |
str |
Your account password |
Example:
from radiojavanapi import Client
from radiojavanapi.exceptions import BadCredentials
client = Client()
try:
client.login("YOUR EMAIL", "YOUR PASSWORD")
except BadCredentials:
# raise due to wrong email or password
# do something
pass
song = client.get_song_by_url(
'https://www.radiojavan.com/mp3s/mp3/Sijal-Baz-Mirim-Baham-(Ft-Sami-Low)')
print(client.like_song(song.id))
print(client.follow_artist(song.artist))Show Output
True
True
Arguments:
| Name | Type | Description |
|---|---|---|
firstname |
str |
Your account firstname |
lastname |
str |
Your account lastname |
username |
str |
Your account username |
email |
str |
Your account email |
password |
str |
Your account password |
auto_login |
bool |
Login to account after sign up |
Example:
from radiojavanapi import Client
client = Client()
client.signup("YOUR FIRSTNAME", "YOUR LASTNAME", "YOUR USERNAME", "YOUR EMAIL", "YOUR PASSWORD", True)You can save your session like this:
clientObj.save_session('./myaccount')And you can load your session as well to avoid many logins:
clientObj.load_session('./myaccount')All account methods require authentication.
?> Radiojavanapi Docs: Check here for login or sign up.
- Get list of:
- Your followers & following
- Song & video you've liked befor
- Artist you're following now.
| Method | Return | Description | Login Required |
|---|---|---|---|
| liked_songs() | list[Song] |
Returns list of songs you've liked | YES |
| liked_videos() | list[Video] |
Returns list of videos you've liked | YES |
| following_artists() | list[str] |
Returns list of artist names which you've followed | YES |
| my_followers() | list[ShortUser] |
Returns list of your followers | YES |
| my_following() | list[ShortUser] |
Returns list of your following | YES |
| my_playlists() | MyPlaylists | Returns your video & music playlist's | YES |
Update your account.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| account_edit() |
|
Account | Change profile data | YES |
| account_notifications_update() |
|
bool |
Update your notifications settings | YES |
| change_password() | password: str(Your new passowrd) |
bool |
Change your account password | YES |
| upload_photo() | photo_path: str |
bool |
Upload your profile photo (only jpg/png) | YES |
| remove_photo() | bool |
Remove your profile photo | YES |
!> To remove bio, pass an empty string.
| Method | Return | Description | Login Required |
|---|---|---|---|
| account_info() | Account | Returns private info of your account | YES |
| account_notifications() | NotificationsStatus | Returns status of current notifications settings | YES |
| deactive_account() | bool |
Deactivate your account and logout | YES |
All action methods require authentication.
?> Radiojavanapi Docs: Check here for login or sign up.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| like_song() | song_id: Union[int, str] |
bool |
Like a song | YES |
| unlike_song() | song_id: Union[int, str] |
bool |
Unlike a song | YES |
| like_video() | video_id: Union[int, str] |
bool |
Like a video | YES |
| unlike_video() | video_id: Union[int, str] |
bool |
Unlike a video | YES |
| like_story() | story_id: Union[int, str] |
bool |
Like a story | YES |
| unlike_story() | story_id: Union[int, str] |
bool |
Unlike a story | YES |
| like_podcast() | podcast_id: Union[int, str] |
bool |
Like a podcast | YES |
| unlike_podcast() | podcast_id: Union[int, str] |
bool |
Unlike a podcast | YES |
!> like methods return false if media had been liked already and unlike methods return false if media hadn't been liked before.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| follow_artist() | name: str |
bool |
Follow a artist | YES |
| unfollow_artist() | name: str |
bool |
Unfollow a artist | YES |
| follow_user() | username: str |
bool |
Follow a user | YES |
| unfollow_user() | username: str |
bool |
Unfollow a user | YES |
| follow_music_playlist() | id: str |
bool |
Follow a music (song or mp3) playlist | YES |
| unfollow_music_playlist() | id: str |
bool |
Unfollow a music (song or mp3) playlist | YES |
!> Pass exact artist name (on RJ api) as name
- Create, rename or delete playlist
- Add song or video to playlist
- Remove song or video from playlist
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| create_music_playlist() |
|
str |
Create a music playlist and returns playlist id | YES |
| create_video_playlist() |
|
str |
Create a video playlist and returns playlist id | YES |
| rename_music_playlist() |
|
bool |
Rename your music playlist | YES |
| rename_video_playlist() |
|
bool |
Rename your video playlist | YES |
| delete_music_playlist() | id: str |
bool |
Delete your music playlist | YES |
| delete_video_playlist() | id: str |
bool |
Delete your video playlist | YES |
| add_to_music_playlist() |
|
bool |
Add a song to your music playlist | YES |
| add_to_video_playlist() |
|
bool |
Add a video to your video playlist | YES |
| remove_from_music_playlist() |
|
bool |
Remove a song from your music playlist | YES |
| remove_from_video_playlist() |
|
bool |
Remove a video from your video playlist | YES |
!> In RadioJavan you can't create empty playlist , so you need a song/video id for creating playlist.
!> Add methods: returns false if song/video had been added already
Remove methods: returns false if song/video hadn't been added before
Get medias & users info as their models.
All methods work with out authentication too.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_song_by_url() | url: HttpUrl |
Song | Returns song info by site url (e.g. play.radiojavan.com/song/...) |
NO |
| get_song_by_id() | id: Union[int, str] |
Song | Returns song info by id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_video_by_url() | url: HttpUrl |
Video | Returns video info by site url (e.g. play.radiojavan.com/video/...) |
NO |
| get_video_by_id() | id: Union[int, str] |
Video | Returns video info by id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_story_by_url() | url: HttpUrl |
Story | Returns story info by site url (e.g. play.radiojavan.com/story/...) |
NO |
| get_story_by_hash_id() | hash_id: str |
Story | Returns story by hash id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_podcast_by_url() | url: HttpUrl |
Podcast | Returns podcast info by site url (e.g. play.radiojavan.com/podcast/...) |
NO |
| get_podcast_by_id() | id: Union[int, str] |
Podcast | Returns podcast info by id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_album_by_url() | url: HttpUrl |
Album | Returns album info by site url (e.g. play.radiojavan.com/album/...) |
NO |
| get_album_by_id() | id: Union[int, str] |
Album | Returns album info by id | NO |
!> This id belong to one of album-tracks, usually first track.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_artist_by_url() | url: HttpUrl |
Artist | Returns artist info by site url (e.g. play.radiojavan.com/artist/...) |
NO |
| get_artist_by_name() | name: str |
Artist | Returns artist info by id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_music_playlist_by_url() | url: HttpUrl |
MusicPlaylist | Returns music playlist info by site url (e.g. play.radiojavan.com/playlist/mp3/...) |
NO |
| get_music_playlist_by_id() | id: str |
MusicPlaylist | Returns music playlist info by id | NO |
| get_video_playlist_by_url() | url: HttpUrl |
VideoPlaylist | Returns video playlist info by site url (e.g. play.radiojavan.com/playlist/video/...) |
NO |
| get_video_playlist_by_id() | id: str |
VideoPlaylist | Returns video playlist info by id | NO |
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| get_user_by_url() | url: HttpUrl |
User | Returns user info by site url (e.g. play.radiojavan.com/u/...) |
NO |
| get_user_by_username() | username: str |
User | Returns user info by username | NO |
| get_user_followers() | username: str |
list[ShortUser] |
Returns list of user followers | NO |
| get_user_following() | username: str |
list[ShortUser] |
Returns list of user following | NO |
Search on RadioJavan and get results as SearchResults.
This method work with out authentication too.
| Method | Arguments | Return | Description | Login Required |
|---|---|---|---|---|
| search() | query: str |
SearchResults | Returns search results object | NO |
Everything you see in Browse tab in desktop application. like trending, popular, featured, latest and ....
All methods work with out authentication too.
| Method | Return | Description | Login Required |
|---|---|---|---|
| get_latest_stories() | list[Story] |
Returns list of latest stories | NO |
| get_trending_songs() | list[Song] |
Returns list of trending songs | NO |
| get_popular_songs() | list[Song] |
Returns list of popular songs | NO |
| get_featured_songs() | list[Song] |
Returns list of featured songs | NO |
| get_latest_albums() | list[Album] |
Returns list of latest albums | NO |
| get_trending_videos() | list[Video] |
Returns list of trending videos | NO |
| get_popular_videos() | list[Video] |
Returns list of popular videos | NO |
| get_featured_videos() | list[Video] |
Returns list of featured videos | NO |
| get_latest_videos() | list[Video] |
Returns list of latest videos | NO |
| get_popular_podcasts() | list[Podcast] |
Returns list of popular podcasts | NO |
| get_featured_podcasts() | list[Podcast] |
Returns list of featured podcasts | NO |
| get_talk_podcasts() | list[Podcast] |
Returns list of talk podcasts | NO |
| get_shows_podcasts() | list[Podcast] |
Returns list of shows podcasts | NO |
Get stream links and ... .
All methods work with out authentication too.
| Method | Return | Description | Login Required |
|---|---|---|---|
| get_trending_searches() | list[str] |
Returns list of trending searches | NO |
| get_tv_stream() | str |
Returns RJ tv stream link | NO |
| get_radio_stream() | dict |
Returns RJ radio stream links and short data of current and next songs | NO |