### Install RadioJavanAPI via PyPI Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/quick-start.md Standard installation command for the library. ```bash pip install radiojavanapi ``` -------------------------------- ### Install RadioJavanAPI from GitHub Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/quick-start.md Installation command for the latest development version from the master branch. ```bash pip install git+https://github.com/xHossein/radiojavanapi@master ``` -------------------------------- ### Example Output Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/quick-start.md The expected console output after running the basic usage script. ```text Name: Baz Mirim Baham (Ft Sami Low) Artist: Sijal Plays: 693934 Downloads: 693934 HQ-Link: https://host2.mediacon-rj.app/media/mp3/aac-256/99926-cf9dd3814907dbb.m4a ``` -------------------------------- ### Initialize Client and Fetch Song Data Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/quick-start.md Demonstrates client initialization, optional proxy configuration, and retrieving song details by URL. ```python from radiojavanapi import Client # Create a Client instance. and set a proxy (Optional) client = Client() client.set_proxy({ 'http':'socks5://127.0.0.1:8087' 'https':'socks5://127.0.0.1:8087' }) song = client.get_song_by_url( 'https://play.radiojavan.com/song/sijal-baz-mirim-baham-(ft-sami-low)') print(f""" Name: {song.name} Artist: {song.artist} Plays: {song.plays} Downloads: {song.downloads} HQ-Link: {song.hq_link} """) ``` -------------------------------- ### signup(firstname, lastname, username, email, password, auto_login) Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Registers a new account with the provided user details. ```APIDOC ## signup(firstname, lastname, username, email, password, auto_login) ### Description Creates a new account on RadioJavan. ### Parameters - **firstname** (str) - Required - Your account firstname - **lastname** (str) - Required - Your account lastname - **username** (str) - Required - Your account username - **email** (str) - Required - Your account email - **password** (str) - Required - Your account password - **auto_login** (bool) - Required - Login to account after sign up ### Example ```python client.signup("FIRST", "LAST", "USER", "EMAIL", "PASS", True) ``` ``` -------------------------------- ### login(email, password) Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Authenticates a user with their email and password. Raises BadCredentials if authentication fails. ```APIDOC ## login(email, password) ### Description Authenticates the client using the provided email and password. ### Parameters - **email** (str) - Required - Your account email - **password** (str) - Required - Your account password ### Example ```python client.login("YOUR EMAIL", "YOUR PASSWORD") ``` ``` -------------------------------- ### Authenticate with Login Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Uses the Client class to authenticate with email and password, handling potential BadCredentials exceptions. ```python 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)) ``` -------------------------------- ### Sign Up New Account Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Registers a new user account with personal details and an optional auto-login flag. ```python from radiojavanapi import Client client = Client() client.signup("YOUR FIRSTNAME", "YOUR LASTNAME", "YOUR USERNAME", "YOUR EMAIL", "YOUR PASSWORD", True) ``` -------------------------------- ### Configure Docsify for RadioJavan API Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/index.html Sets up the global Docsify configuration object to manage documentation structure, repository links, and search behavior. ```javascript window.$docsify = { name: 'radiojavanapi', repo: 'https://github.com/xHossein/radiojavanapi', loadSidebar: 'sidebar.md', coverpage : 'coverpage.md', homepage : 'introduction.md', alias: { '.*?/changelog': 'https://raw.githubusercontent.com/xHossein/radiojavanapi/master/CHANGELOG.md', }, auto2top : true, maxLevel : 3, subMaxLevel: 3, executeScript: true, search: { depth : 3, noData : 'No results!', placeholder: 'Search...' } } ``` -------------------------------- ### Playlist Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve music and video playlist information. ```APIDOC ## get_music_playlist_by_url(url: HttpUrl) Returns music playlist info by site url. ## get_music_playlist_by_id(id: str) Returns music playlist info by id. ## get_video_playlist_by_url(url: HttpUrl) Returns video playlist info by site url. ## get_video_playlist_by_id(id: str) Returns video playlist info by id. ``` -------------------------------- ### my_playlists() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns the authenticated user's video and music playlists. ```APIDOC ## my_playlists() ### Description Returns your video & music playlist's. ### Login Required YES ``` -------------------------------- ### Playlist Management Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to create, rename, delete, and modify music and video playlists. ```APIDOC ## create_music_playlist(name, song_id) ## create_video_playlist(name, video_id) ## rename_music_playlist(id, name) ## rename_video_playlist(id, name) ## delete_music_playlist(id) ## delete_video_playlist(id) ## add_to_music_playlist(id, song_id) ## add_to_video_playlist(id, video_id) ## remove_from_music_playlist(id, song_id) ## remove_from_video_playlist(id, video_id) ### Description Methods for managing user playlists. Note that playlists cannot be created empty and require an initial media item ID. ### Returns - **str** (for create methods) - The ID of the newly created playlist. - **bool** (for other methods) - Success status. ``` -------------------------------- ### Access Podcast Attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing a property on a Podcast object instance. ```python podcastObj.duration ``` -------------------------------- ### my_following() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns a list of users the authenticated user is following. ```APIDOC ## my_following() ### Description Returns a list of your following. ### Login Required YES ``` -------------------------------- ### Like & Unlike Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to like or unlike songs, videos, stories, and podcasts. ```APIDOC ## like_song(song_id) ## unlike_song(song_id) ## like_video(video_id) ## unlike_video(video_id) ## like_story(story_id) ## unlike_story(story_id) ## like_podcast(podcast_id) ## unlike_podcast(podcast_id) ### Description Methods to like or unlike specific media items. These methods require authentication. ### Parameters - **song_id / video_id / story_id / podcast_id** (Union[int, str]) - Required - The unique identifier of the media item. ### Returns - **bool** - Returns true if successful, false if the media was already liked (for like methods) or not liked (for unlike methods). ``` -------------------------------- ### User Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve user profiles, followers, and following lists. ```APIDOC ## get_user_by_url(url: HttpUrl) Returns user info by site url. ## get_user_by_username(username: str) Returns user info by username. ## get_user_followers(username: str) Returns list of user followers. ## get_user_following(username: str) Returns list of user following. ``` -------------------------------- ### Podcast Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve podcast information by URL or ID. ```APIDOC ## get_podcast_by_url(url: HttpUrl) Returns podcast info by site url. ## get_podcast_by_id(id: Union[int, str]) Returns podcast info by id. ``` -------------------------------- ### Access Artist Attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing a property on an Artist object instance. ```python artistObj.name ``` -------------------------------- ### Access MyPlaylists attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing the music_playlists attribute of a MyPlaylists object. ```python myplaylistsObj.music_playlists ``` -------------------------------- ### following_artists() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns a list of artist names the authenticated user is following. ```APIDOC ## following_artists() ### Description Returns a list of artist names which you've followed. ### Login Required YES ``` -------------------------------- ### Album Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve album information by URL or ID. ```APIDOC ## get_album_by_url(url: HttpUrl) Returns album info by site url. ## get_album_by_id(id: Union[int, str]) Returns album info by id (belongs to one of album-tracks). ``` -------------------------------- ### Save and Load Session Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Persists the current client session to a file or restores it to avoid repeated logins. ```python clientObj.save_session('./myaccount') ``` ```python clientObj.load_session('./myaccount') ``` -------------------------------- ### Song Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve song information by URL or ID. ```APIDOC ## get_song_by_url(url: HttpUrl) Returns song info by site url. ## get_song_by_id(id: Union[int, str]) Returns song info by id. ``` -------------------------------- ### Browse Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve trending, popular, featured, and latest content from the RadioJavan platform. These methods do not require authentication. ```APIDOC ## Browse Methods ### Description Retrieve various media lists including stories, songs, albums, videos, and podcasts. ### Available Methods - **get_latest_stories()**: Returns a list of latest stories. - **get_trending_songs()**: Returns a list of trending songs. - **get_popular_songs()**: Returns a list of popular songs. - **get_featured_songs()**: Returns a list of featured songs. - **get_latest_albums()**: Returns a list of latest albums. - **get_trending_videos()**: Returns a list of trending videos. - **get_popular_videos()**: Returns a list of popular videos. - **get_featured_videos()**: Returns a list of featured videos. - **get_latest_videos()**: Returns a list of latest videos. - **get_popular_podcasts()**: Returns a list of popular podcasts. - **get_featured_podcasts()**: Returns a list of featured podcasts. - **get_talk_podcasts()**: Returns a list of talk podcasts. - **get_shows_podcasts()**: Returns a list of shows podcasts. ``` -------------------------------- ### Artist Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve artist information by URL or name. ```APIDOC ## get_artist_by_url(url: HttpUrl) Returns artist info by site url. ## get_artist_by_name(name: str) Returns artist info by name. ``` -------------------------------- ### Access Video object attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing a read-only attribute on a Video object instance. ```python videoObj.dislikes ``` -------------------------------- ### Session Management Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to persist and restore user sessions to avoid repeated logins. ```APIDOC ## save_session(path) ### Description Saves the current session to a file. ## load_session(path) ### Description Loads a previously saved session from a file. ``` -------------------------------- ### Video Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve video information by URL or ID. ```APIDOC ## get_video_by_url(url: HttpUrl) Returns video info by site url. ## get_video_by_id(id: Union[int, str]) Returns video info by id. ``` -------------------------------- ### liked_videos() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns a list of videos the authenticated user has liked. ```APIDOC ## liked_videos() ### Description Returns a list of videos you've liked. ### Login Required YES ``` -------------------------------- ### Story Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to retrieve story information by URL or hash ID. ```APIDOC ## get_story_by_url(url: HttpUrl) Returns story info by site url. ## get_story_by_hash_id(hash_id: str) Returns story by hash id. ``` -------------------------------- ### account_info() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns private information about the authenticated user's account. ```APIDOC ## account_info() ### Description Returns private info of your account. ### Login Required YES ``` -------------------------------- ### Access Album object attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing a read-only attribute on an Album object instance. ```python albumObj.tracks ``` -------------------------------- ### upload_photo() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Uploads a profile photo for the authenticated user. ```APIDOC ## upload_photo() ### Description Upload your profile photo (only jpg/png). ### Arguments - photo_path (str) - Required ### Login Required YES ``` -------------------------------- ### my_followers() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns a list of the authenticated user's followers. ```APIDOC ## my_followers() ### Description Returns a list of your followers. ### Login Required YES ``` -------------------------------- ### account_notifications() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns the current notification settings status. ```APIDOC ## account_notifications() ### Description Returns status of current notifications settings. ### Login Required YES ``` -------------------------------- ### Follow & Unfollow Methods Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Methods to follow or unfollow artists, users, and music playlists. ```APIDOC ## follow_artist(name) ## unfollow_artist(name) ## follow_user(username) ## unfollow_user(username) ## follow_music_playlist(id) ## unfollow_music_playlist(id) ### Description Methods to manage social following relationships and playlist subscriptions. Requires authentication. ### Parameters - **name / username / id** (str) - Required - The identifier for the artist, user, or playlist. ``` -------------------------------- ### search(query: str) Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Performs a search on RadioJavan and returns a SearchResults object. This method does not require authentication. ```APIDOC ## search(query: str) ### Description Returns search results based on the provided query string. ### Parameters - **query** (str) - Required - The search term to look for. ``` -------------------------------- ### liked_songs() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Returns a list of songs the authenticated user has liked. ```APIDOC ## liked_songs() ### Description Returns a list of songs you've liked. ### Login Required YES ``` -------------------------------- ### Song Information Output Source: https://github.com/xhossein/radiojavanapi/blob/master/README.md The expected output format when retrieving song information. ```text Name: Baz Mirim Baham (Ft Sami Low) Artist: Sijal HQ-Link: https://host2.mediacon-rj.app/media/mp3/aac-256/99926-cf9dd3814907dbb.m4a ``` -------------------------------- ### Access ShortData attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing the id attribute of a ShortData object. ```python shordataObj.id ``` -------------------------------- ### Access VideoPlaylist videos Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Retrieve the list of videos associated with a VideoPlaylist object. ```python playlistObj.videos ``` -------------------------------- ### Access User attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Access the tracks associated with a User object. ```python userObj.tracks ``` -------------------------------- ### Access NotificationsStatus attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Demonstrates accessing the artists_email attribute of a NotificationsStatus object. ```python notifObj.artists_email ``` -------------------------------- ### Access Song attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Retrieve specific read-only data from a Song object instance. ```python songObj.dislikes ``` -------------------------------- ### change_password() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Changes the authenticated user's account password. ```APIDOC ## change_password() ### Description Change your account password. ### Arguments - password (str) - Required ### Login Required YES ``` -------------------------------- ### Access ShortUser tracks Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Access the tracks attribute of a ShortUser object. ```python shortuserObj.tracks ``` -------------------------------- ### Access Account attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Retrieve specific read-only data from an Account object instance. ```python accountObj.email ``` -------------------------------- ### Access MusicPlaylist songs Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Access the songs attribute of a MusicPlaylist object. ```python playlistObj.songs ``` -------------------------------- ### account_edit() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Updates the authenticated user's profile information. ```APIDOC ## account_edit() ### Description Change profile data. ### Arguments - firstname (str) - Optional - lastname (str) - Optional - username (str) - Optional - email (str) - Optional - bio (str) - Optional ### Login Required YES ``` -------------------------------- ### account_notifications_update() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Updates the notification settings for the authenticated user. ```APIDOC ## account_notifications_update() ### Description Update your notifications settings. ### Arguments - new_music (bool) - Optional - followed_artists (bool) - Optional ### Login Required YES ``` -------------------------------- ### get_tv_stream() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Retrieves the stream link for RadioJavan TV. ```APIDOC ## get_tv_stream() ### Description Returns the direct stream link for the RJ TV channel. ### Method Function Call ### Returns - **str** - The URL string for the TV stream. ``` -------------------------------- ### Access SearchResults songs Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Retrieve the list of songs found within a SearchResults object. ```python resultsObj.songs ``` -------------------------------- ### Access Story attributes Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/models.md Access the unique identifier of a Story object. ```python storyObj.id ``` -------------------------------- ### get_trending_searches() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Retrieves a list of current trending search terms. ```APIDOC ## get_trending_searches() ### Description Returns a list of trending searches from the platform. ### Method Function Call ### Returns - **list[str]** - A list of trending search strings. ``` -------------------------------- ### deactive_account() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Deactivates the authenticated user's account and logs them out. ```APIDOC ## deactive_account() ### Description Deactivate your account and logout. ### Login Required YES ``` -------------------------------- ### remove_photo() Source: https://github.com/xhossein/radiojavanapi/blob/master/docs/methods.md Removes the authenticated user's profile photo. ```APIDOC ## remove_photo() ### Description Remove your profile photo. ### Login Required YES ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.