1 #pragma once 2 3 #include "lib/spotify/album.hpp" 4 #include "lib/spotify/artist.hpp" 5 #include "lib/spotify/playlist.hpp" 6 #include "lib/spotify/track.hpp" 7 8 #include <vector> 9 10 namespace lib 11 { 12 namespace spt 13 { 14 /** 15 * Spotify search results 16 */ 17 class search_results 18 { 19 public: 20 search_results() = default; 21 22 /** 23 * Albums found 24 */ 25 std::vector<lib::spt::album> albums; 26 27 /** 28 * Artists found 29 */ 30 std::vector<lib::spt::artist> artists; 31 32 /** 33 * Tracks found 34 */ 35 std::vector<lib::spt::track> tracks; 36 37 /** 38 * Playlists found 39 */ 40 std::vector<lib::spt::playlist> playlists; 41 }; 42 43 /** 44 * Search results -> JSON 45 */ 46 void to_json(nlohmann::json &j, const search_results &s); 47 48 /** 49 * JSON -> Search results 50 */ 51 void from_json(const nlohmann::json &j, search_results &s); 52 } 53 } 54