search.proto 1023 B

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