presence.proto 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. message PlaylistPublishedState {
  2. optional string uri = 0x1;
  3. optional int64 timestamp = 0x2;
  4. }
  5. message PlaylistTrackAddedState {
  6. optional string playlist_uri = 0x1;
  7. optional string track_uri = 0x2;
  8. optional int64 timestamp = 0x3;
  9. }
  10. message TrackFinishedPlayingState {
  11. optional string uri = 0x1;
  12. optional string context_uri = 0x2;
  13. optional int64 timestamp = 0x3;
  14. optional string referrer_uri = 0x4;
  15. }
  16. message FavoriteAppAddedState {
  17. optional string app_uri = 0x1;
  18. optional int64 timestamp = 0x2;
  19. }
  20. message TrackStartedPlayingState {
  21. optional string uri = 0x1;
  22. optional string context_uri = 0x2;
  23. optional int64 timestamp = 0x3;
  24. optional string referrer_uri = 0x4;
  25. }
  26. message UriSharedState {
  27. optional string uri = 0x1;
  28. optional string message = 0x2;
  29. optional int64 timestamp = 0x3;
  30. }
  31. message ArtistFollowedState {
  32. optional string uri = 0x1;
  33. optional string artist_name = 0x2;
  34. optional string artist_cover_uri = 0x3;
  35. optional int64 timestamp = 0x4;
  36. }
  37. message DeviceInformation {
  38. optional string os = 0x1;
  39. optional string type = 0x2;
  40. }
  41. message GenericPresenceState {
  42. optional int32 type = 0x1;
  43. optional int64 timestamp = 0x2;
  44. optional string item_uri = 0x3;
  45. optional string item_name = 0x4;
  46. optional string item_image = 0x5;
  47. optional string context_uri = 0x6;
  48. optional string context_name = 0x7;
  49. optional string context_image = 0x8;
  50. optional string referrer_uri = 0x9;
  51. optional string referrer_name = 0xa;
  52. optional string referrer_image = 0xb;
  53. optional string message = 0xc;
  54. optional DeviceInformation device_information = 0xd;
  55. }
  56. message State {
  57. optional int64 timestamp = 0x1;
  58. optional Type type = 0x2;
  59. enum Type {
  60. PLAYLIST_PUBLISHED = 0x1;
  61. PLAYLIST_TRACK_ADDED = 0x2;
  62. TRACK_FINISHED_PLAYING = 0x3;
  63. FAVORITE_APP_ADDED = 0x4;
  64. TRACK_STARTED_PLAYING = 0x5;
  65. URI_SHARED = 0x6;
  66. ARTIST_FOLLOWED = 0x7;
  67. GENERIC = 0xb;
  68. }
  69. optional string uri = 0x3;
  70. optional PlaylistPublishedState playlist_published = 0x4;
  71. optional PlaylistTrackAddedState playlist_track_added = 0x5;
  72. optional TrackFinishedPlayingState track_finished_playing = 0x6;
  73. optional FavoriteAppAddedState favorite_app_added = 0x7;
  74. optional TrackStartedPlayingState track_started_playing = 0x8;
  75. optional UriSharedState uri_shared = 0x9;
  76. optional ArtistFollowedState artist_followed = 0xa;
  77. optional GenericPresenceState generic = 0xb;
  78. }
  79. message StateList {
  80. repeated State states = 0x1;
  81. }