Check the module documentation.
The official API documentation can be found here.
nimble install audius
import audius
#Create new audius client.
let client = newAudius()
# Search users.
for user in client.searchUsers("Brownies"):
echo "User: " & user.name
# Create new user by id.
let user = client.getUser("nlGNe")
# List user's tracks.
for track in user.tracks:
echo "Track: " & track.title
# List user's favorite tracks.
for favorite in user.favorites:
echo "Favorite: " & favorite.title
# List user reposted tracks.
for repost in user.reposts:
echo "Repost: " & repost.title
# List common user's tags.
for tag in user.tags:
echo "Tag: " & tag
# Search playlists
for playlist in client.searchPlaylists("Hot & New"):
echo "Palylist: " & playlist.playlistName
# Create new playlist by id.
let playlist = client.getPlaylist("DOPRl")
# List tracks in playlist.
for track in playlist.tracks:
echo "Playlist Track: " & track.title
- Use SSL:
nim r -d:ssl examples/simple.nim
- Add cacert.pem in your running directory.