1 #pragma once
2 
3 #include "lib/httpclient.hpp"
4 #include "lib/spotify/callback.hpp"
5 #include "lib/spotify/track.hpp"
6 #include "lib/spotify/error.hpp"
7 #include "lib/strings.hpp"
8 #include "lib/spotify/trackinfo.hpp"
9 
10 namespace lib
11 {
12 	/**
13 	 * Lyrics helper
14 	 * @note May or not be against ToS, use at your own risk
15 	 */
16 	class lyrics
17 	{
18 	public:
19 		/**
20 		 * Instance a new lyrics helper
21 		 * @param http_client HTTP client instance
22 		 */
23 		explicit lyrics(const lib::http_client &http_client);
24 
25 		/**
26 		 * Try to get lyrics
27 		 * @param track Track to get lyrics for
28 		 * @param callback Callback with lyrics
29 		 * @throws runtime_error Failed to get lyrics or none found
30 		 */
31 		void get(const lib::spt::track &track,
32 			lib::callback<lib::spt::track_info> &callback);
33 
34 	private:
35 		const lib::http_client &http;
36 	};
37 }
38