Skip to main content

lastfm_client/api/
constants.rs

1/// Base URL for the Last.fm API
2pub const BASE_URL: &str = "https://ws.audioscrobbler.com/2.0/";
3
4/// Last.fm API method for fetching a user's recent tracks
5pub const METHOD_RECENT_TRACKS: &str = "user.getrecenttracks";
6
7/// Last.fm API method for fetching a user's loved tracks
8pub const METHOD_LOVED_TRACKS: &str = "user.getlovedtracks";
9
10/// Last.fm API method for fetching a user's top tracks
11pub const METHOD_TOP_TRACKS: &str = "user.gettoptracks";
12
13/// Last.fm API method for fetching a user's top artists
14pub const METHOD_TOP_ARTISTS: &str = "user.gettopartists";
15
16/// Last.fm API method for fetching a user's top albums
17pub const METHOD_TOP_ALBUMS: &str = "user.gettopalbums";
18
19/// Last.fm API method for fetching user info
20pub const METHOD_USER_INFO: &str = "user.getinfo";
21
22/// Last.fm API method for fetching a user's top tags
23pub const METHOD_TOP_TAGS: &str = "user.gettoptags";
24
25/// Last.fm API method for fetching a user's weekly chart list
26pub const METHOD_WEEKLY_CHART_LIST: &str = "user.getweeklychartlist";
27
28/// Last.fm API method for fetching a user's weekly track chart
29pub const METHOD_WEEKLY_TRACK_CHART: &str = "user.getweeklytrackchart";
30
31/// Last.fm API method for fetching a user's weekly artist chart
32pub const METHOD_WEEKLY_ARTIST_CHART: &str = "user.getweeklyartistchart";
33
34/// Last.fm API method for fetching a user's weekly album chart
35pub const METHOD_WEEKLY_ALBUM_CHART: &str = "user.getweeklyalbumchart";
36
37/// Last.fm API method for fetching a user's friends
38pub const METHOD_FRIENDS: &str = "user.getfriends";
39
40/// Last.fm API method for fetching a user's personal tags
41pub const METHOD_PERSONAL_TAGS: &str = "user.getpersonaltags";
42
43/// Maximum number of tracks that can be fetched in a single API request
44pub const API_MAX_LIMIT: u32 = 1000;
45
46/// Multiplier for chunking large requests
47pub const CHUNK_MULTIPLIER: u32 = 5;
48
49/// Size of each chunk for pagination
50pub const CHUNK_SIZE: u32 = API_MAX_LIMIT * CHUNK_MULTIPLIER;