1syntax = "proto2";
2
3message SearchRequest {
4    optional string query = 0x1;
5    optional Type type = 0x2;
6    enum Type {
7        TRACK = 0x0;
8        ALBUM = 0x1;
9        ARTIST = 0x2;
10        PLAYLIST = 0x3;
11        USER = 0x4;
12    }
13    optional int32 limit = 0x3;
14    optional int32 offset = 0x4;
15    optional bool did_you_mean = 0x5;
16    optional string spotify_uri = 0x2;
17    repeated bytes file_id = 0x3;
18    optional string url = 0x4;
19    optional string slask_id = 0x5;
20}
21
22message Playlist {
23    optional string uri = 0x1;
24    optional string name = 0x2;
25    repeated Image image = 0x3;
26}
27
28message User {
29    optional string username = 0x1;
30    optional string full_name = 0x2;
31    repeated Image image = 0x3;
32    optional sint32 followers = 0x4;
33}
34
35message SearchReply {
36    optional sint32 hits = 0x1;
37    repeated Track track = 0x2;
38    repeated Album album = 0x3;
39    repeated Artist artist = 0x4;
40    repeated Playlist playlist = 0x5;
41    optional string did_you_mean = 0x6;
42    repeated User user = 0x7;
43}
44
45