SpotifyRegisterReq.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package com.cyksj.model.request;
  2. import lombok.Data;
  3. import java.util.List;
  4. /**
  5. * @author chan
  6. * @date 2023/1/9 5:33 PM
  7. */
  8. @Data
  9. public class SpotifyRegisterReq {
  10. /*
  11. {
  12. "account_details": {
  13. "birthdate": "2001-06-23",
  14. "consent_flags": {
  15. "eula_agreed": true,
  16. "send_email": false,
  17. "third_party_email": true
  18. },
  19. "display_name": "chan sudie",
  20. "email_and_password_identifier": {
  21. "email": "chansuide@github.com",
  22. "password": "chansuide1234"
  23. },
  24. "gender": 1
  25. },
  26. "callback_uri": "https://www.spotify.com/signup/challenge?locale=tr",
  27. "client_info": {
  28. "api_key": "a1e486e2729f46d6bb368d6b2bcda326",
  29. "app_version": "v2",
  30. "capabilities": [1],
  31. "installation_id": "07b84cda-709c-432e-af56-84245c6e4294",
  32. "platform": "www"
  33. },
  34. "tracking": {
  35. "creation_flow": "",
  36. "creation_point": "https://www.spotify.com/tr/",
  37. "referrer": ""
  38. }
  39. }
  40. */
  41. private AccountDetails account_details;
  42. private String callback_uri = "https://www.spotify.com/signup/challenge?locale=tr";
  43. private ClientInfo client_info = new ClientInfo();
  44. private Tracking tracking = new Tracking();
  45. @Data
  46. public static class AccountDetails{
  47. private String birthdate;
  48. private ConsentFlags consent_flags = new ConsentFlags();
  49. private String display_name;
  50. private EmailAndPasswordIdentifier email_and_password_identifier;
  51. private Integer gender;
  52. @Data
  53. public static class ConsentFlags{
  54. private Boolean eula_agreed = true;
  55. private Boolean send_email = true;
  56. private Boolean third_party_email = true;
  57. }
  58. @Data
  59. public static class EmailAndPasswordIdentifier{
  60. /*
  61. "email": "chansuide@github.com",
  62. "password": "chansuide1234"
  63. */
  64. private String email;
  65. private String password;
  66. }
  67. }
  68. @Data
  69. public static class ClientInfo{
  70. //private String api_key = "a1e486e2729f46d6bb368d6b2bcda326";
  71. private String api_key = "4c7a36d5260abca4af282779720cf631";
  72. private String app_version = "v2";
  73. private List<Integer> capabilities = List.of(1);
  74. private String installation_id = "07b84cda-709c-432e-af56-84245c6e4294";
  75. private String platform = "www";
  76. }
  77. @Data
  78. public static class Tracking{
  79. private String creation_flow = "";
  80. private String creation_point = "https://www.spotify.com/tr/";
  81. private String referrer = "";
  82. }
  83. }