Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $.Class.extend("GS.Controllers.ServiceController", {
  2.         configDefaults: {
  3.             hostname: window.location.host,
  4.             sessionID: null,
  5.             client: "htmlshark",
  6.             clientRevision: "20101222",
  7.             revToken: "quitStealinMahShit",
  8.             country: null,
  9.             privacy: 0,
  10.             uuID: "",
  11.             defaultEndpoint: "more.php"
  12.         },
  13.         instance: function () {
  14.             H || (H = new GS.Controllers.ServiceController({
  15.                 hostname: window.location.host,
  16.                 sessionID: gsConfig.sessionID,
  17.                 clientRevision: gsConfig.revision,
  18.                 country: gsConfig.country,
  19.                 privacy: gsConfig.user.Privacy,
  20.                 uuID: gsConfig.uuid,
  21.                 defaultEndpoint: gsConfig.endpoint
  22.             }));
  23.             return H
  24.         }
  25.     }, {
  26.         faultCodes: {
  27.             INVALID_CLIENT: 1024,
  28.             RATE_LIMITED: 512,
  29.             INVALID_TOKEN: 256,
  30.             INVALID_SESSION: 16,
  31.             MAINTENANCE: 10,
  32.             MUST_BE_LOGGED_IN: 8,
  33.             HTTP_TIMEOUT: 6,
  34.             PARSE_ERROR: 4,
  35.             HTTP_ERROR: 2,
  36.             EMPTY_RESULT: -256
  37.         },
  38.         init: function (p) {
  39.             $.extend(this, GS.Controllers.ServiceController.configDefaults, p);
  40.             this.currentToken = null;
  41.             this.tokenExpires = 0;
  42.             this.lastTokenFailed = this.tokenPending = false;
  43.             this.reauthPending = this.lastRandomizer = null;
  44.             this.downForMaintenance = false;
  45.             this.lastDowntimeNotification = 0;
  46.             this.callsPendingToken = [];
  47.             this.callsPendingAuth = [];
  48.             this.callsPendingCountry = [];
  49.             this.callsPendingSWF = [];
  50.             this.outgoingSWFCalls = {};
  51.             this.swfProxy = null;
  52.             this.sessionID || c.createRequest(false, "initiateSession", {}, {
  53.                 async: false
  54.             }).send();
  55.             var q = c.createRequest(false, "getCountry");
  56.             q.faultFilters.push(function () {
  57.                 return false
  58.             });
  59.             q.promise().then(this.callback(C), this.callback(C));
  60.             this.country ? q.resolve(this.country) : _.wait(1).then(function () {
  61.                 q.send()
  62.             })
  63.         },
  64.         serviceExists: function () {
  65.             return true
  66.         },
  67.         swfReady: function () {
  68.             for (var p; this.callsPendingSWF.length;) {
  69.                 p = this.callsPendingSWF.shift();
  70.                 p.send()
  71.             }
  72.             return true
  73.         },
  74.         swfBadHost: function () {
  75.             GS.lightbox.open("badHost")
  76.         },
  77.         swfSuccess: function (p, q) {
  78.             var s = this.outgoingSWFCalls[q];
  79.             s && r(p, s);
  80.             delete this.outgoingSWFCalls[q]
  81.         },
  82.         swfFault: function (p, q) {
  83.             var s = this.outgoingSWFCalls[q];
  84.             s && t(p, s);
  85.             delete this.outgoingSWFCalls[q]
  86.         },
  87.         swfNeedsToken: function () {
  88.             w()
  89.         },
  90.         onChatData: function (p) {
  91.             console.log("Got chat data:", p)
  92.         },
  93.         onChatError: function (p) {
  94.             console.log("Got chat error, event:", p)
  95.         },
  96.         httpsFormSubmit: function (p, q) {
  97.             var s = $("#httpsForm");
  98.             $("#httpsIframe");
  99.             var v = [];
  100.             s.html("");
  101.             s.attr("action", p);
  102.             s.attr("method", "post");
  103.             s.attr("target", "httpsIframe");
  104.             s.attr("enctype", "multipart/form-data");
  105.             _.forEach(q, function (A, G) {
  106.                 v.push('<input type="hidden" name="' + G + '" value="' + A + '" />')
  107.             });
  108.             s.append(v.join(""));
  109.             s.submit()
  110.         },
  111.         isFirstVisit: function (p) {
  112.             req = c.createRequest(false, "isFirstVisit", {}, {}, false, true);
  113.             req.promise().then(p);
  114.             req.send()
  115.         },
  116.         makeFacebookRequest: function (p, q, s, v, A) {
  117.             req = g.createRequest(false, p, q, s);
  118.             req.promise().then(v, A);
  119.             req.send()
  120.         },
  121.         lastfmHandshake: function (p, q, s) {
  122.             req = h.createRequest(false, "handshake", p);
  123.             req.promise().then(q, s);
  124.             req.send()
  125.         },
  126.         lastfmNowPlaying: function (p, q, s) {
  127.             req = h.createRequest(false, "nowPlaying", p);
  128.             req.promise().then(q, s);
  129.             req.send()
  130.         },
  131.         lastfmSongPlay: function (p, q, s) {
  132.             req = h.createRequest(false, "submission", p);
  133.             req.promise().then(q, s);
  134.             req.send()
  135.         },
  136.         rapleafPersonalize: function (p, q, s) {
  137.             req = c.createRequest(false, "personalize", {
  138.                 redirectURL: p
  139.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  140.             req.type = "rapleaf";
  141.             req.promise().then(q, s);
  142.             req.send()
  143.         },
  144.         rapleafDirect: function (p, q, s) {
  145.             req = c.createRequest(false, "direct", {
  146.                 email: p
  147.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  148.             req.type = "rapleaf";
  149.             req.promise().then(q, s);
  150.             req.send()
  151.         },
  152.         getAlbumByID: function (p, q, s) {
  153.             req = c.createRequest(true, "getAlbumByID", {
  154.                 albumID: p
  155.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  156.             req.promise().then(q, s);
  157.             req.send()
  158.         },
  159.         getArtistByID: function (p, q, s) {
  160.             req = c.createRequest(true, "getArtistByID", {
  161.                 artistID: p
  162.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  163.             req.promise().then(q, s);
  164.             req.send()
  165.         },
  166.         getPlaylistByID: function (p, q, s) {
  167.             req = c.createRequest(true, "getPlaylistByID", {
  168.                 playlistID: p
  169.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  170.             req.promise().then(q, s);
  171.             req.send()
  172.         },
  173.         getQueueSongListFromSongIDs: function (p, q, s) {
  174.             req = c.createRequest(true, "getQueueSongListFromSongIDs", {
  175.                 songIDs: p
  176.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  177.             req.promise().then(q, s);
  178.             req.send()
  179.         },
  180.         getSongFromToken: function (p, q, s) {
  181.             req = c.createRequest(true, "getSongFromToken", {
  182.                 token: p,
  183.                 country: this.country
  184.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  185.             req.promise().then(q, s);
  186.             this.country ? req.send() : this.callsPendingCountry.push(req)
  187.         },
  188.         getTokenForSong: function (p, q, s) {
  189.             req = c.createRequest(true, "getTokenForSong", {
  190.                 songID: p,
  191.                 country: this.country
  192.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  193.             req.promise().then(q, s);
  194.             this.country ? req.send() : this.callsPendingCountry.push(req)
  195.         },
  196.         getUserByID: function (p, q, s) {
  197.             req = c.createRequest(true, "getUserByID", {
  198.                 userID: p
  199.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  200.             req.promise().then(q, s);
  201.             req.send()
  202.         },
  203.         albumGetSongs: function (p, q, s, v, A) {
  204.             q = _.orEqual(q, true);
  205.             s = _.orEqual(s, 0);
  206.             req = c.createRequest(true, "albumGetSongs", {
  207.                 albumID: p,
  208.                 isVerified: q,
  209.                 offset: s
  210.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  211.             req.promise().then(v, A);
  212.             req.send()
  213.         },
  214.         artistGetAlbums: function (p, q, s, v, A) {
  215.             req = c.createRequest(true, "artistGetAlbums", {
  216.                 artistID: p,
  217.                 isVerified: q,
  218.                 offset: s
  219.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  220.             req.promise().then(v, A);
  221.             req.send()
  222.         },
  223.         artistGetSongsEx: function (p, q, s, v) {
  224.             req = c.createRequest(true, "artistGetSongsEx", {
  225.                 artistID: p,
  226.                 isVerifiedOrPopular: q
  227.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  228.             req.promise().then(s, v);
  229.             req.send()
  230.         },
  231.         playlistGetSongs: function (p, q, s) {
  232.             req = c.createRequest(true, "playlistGetSongs", {
  233.                 playlistID: p
  234.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  235.             req.promise().then(q, s);
  236.             req.send()
  237.         },
  238.         popularGetSongs: function (p, q, s) {
  239.             var v = arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1];
  240.             ({
  241.                 daily: true,
  242.                 weekly: true,
  243.                 monthly: true
  244.             })[p] || (p = "daily");
  245.             req = c.createRequest(true, "popularGetSongs", {
  246.                 type: p
  247.             }, v);
  248.             req.promise().then(q, s);
  249.             req.send()
  250.         },
  251.         getArtistsForTagRadio: function (p, q, s) {
  252.             req = c.createRequest(true, "getArtistsForTagRadio", {
  253.                 tagID: p
  254.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  255.             req.promise().then(q, s);
  256.             req.send()
  257.         },
  258.         albumGetFans: function (p, q, s, v) {
  259.             req = c.createRequest(true, "albumGetFans", {
  260.                 albumID: p,
  261.                 offset: q
  262.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  263.             req.promise().then(s, v);
  264.             req.send()
  265.         },
  266.         artistGetFans: function (p, q, s, v) {
  267.             req = c.createRequest(true, "artistGetFans", {
  268.                 artistID: p,
  269.                 offset: q
  270.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  271.             req.promise().then(s, v);
  272.             req.send()
  273.         },
  274.         playlistGetFans: function (p, q, s) {
  275.             req = c.createRequest(true, "playlistGetFans", {
  276.                 playlistID: p
  277.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  278.             req.promise().then(q, s);
  279.             req.send()
  280.         },
  281.         songGetFans: function (p, q, s, v) {
  282.             req = c.createRequest(true, "songGetFans", {
  283.                 songID: p,
  284.                 offset: q
  285.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  286.             req.promise().then(s, v);
  287.             req.send()
  288.         },
  289.         userGetFans: function (p, q, s, v) {
  290.             req = c.createRequest(true, "userGetFans", {
  291.                 userID: p,
  292.                 offset: q
  293.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  294.             req.promise().then(s, v);
  295.             req.send()
  296.         },
  297.         authenticateUser: function (p, q, s, v, A) {
  298.             req = c.createRequest(false, "authenticateUser", {
  299.                 username: p,
  300.                 password: q,
  301.                 savePassword: s
  302.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], true, true);
  303.             req.promise().then(v, A);
  304.             req.send()
  305.         },
  306.         authenticateFacebookUser: function (p, q, s, v, A, G) {
  307.             req = c.createRequest(false, "authenticateFacebookUser", {
  308.                 facebookUserID: p,
  309.                 sessionKey: q,
  310.                 accessToken1: s,
  311.                 accessToken3: v
  312.             }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true, true);
  313.             req.promise().then(A, G);
  314.             req.send()
  315.         },
  316.         authenticateGoogleUser: function (p, q) {
  317.             req = c.createRequest(false, "authenticateGoogleUser", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
  318.             req.promise().then(p, q);
  319.             req.send()
  320.         },
  321.         getStoredUsers: function (p, q) {
  322.             req = c.createRequest(false, "getStoredUsers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
  323.             req.promise().then(p, q);
  324.             req.send()
  325.         },
  326.         deleteStoredUser: function (p, q, s) {
  327.             req = c.createRequest(false, "deleteStoredUser", {
  328.                 username: p
  329.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  330.             req.promise().then(q, s);
  331.             req.send()
  332.         },
  333.         loginStoredUser: function (p, q, s) {
  334.             req = c.createRequest(false, "loginStoredUser", {
  335.                 username: p
  336.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true, true);
  337.             req.promise().then(q, s);
  338.             req.send()
  339.         },
  340.         reportUserChange: function (p, q, s, v, A) {
  341.             req = c.createRequest(false, "reportUserChange", {
  342.                 userID: p,
  343.                 email: q,
  344.                 username: "",
  345.                 privacy: s
  346.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], false, true);
  347.             req.promise().then(v, A);
  348.             req.send()
  349.         },
  350.         killAuthToken: function (p, q) {
  351.             req = c.createRequest(false, "killAuthToken", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
  352.             req.promise().then(p, q);
  353.             req.send()
  354.         },
  355.         logoutUser: function (p, q) {
  356.             req = c.createRequest(false, "logoutUser", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
  357.             req.promise().then(p, q);
  358.             req.send()
  359.         },
  360.         userForgotPassword: function (p, q, s) {
  361.             req = c.createRequest(false, "userForgotPassword", {
  362.                 usernameOrEmail: p
  363.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
  364.             req.promise().then(q, s);
  365.             req.send()
  366.         },
  367.         resetPassword: function (p, q, s, v, A) {
  368.             req = c.createRequest(false, "resetPassword", {
  369.                 usernameOrEmail: p,
  370.                 secretResetCode: q,
  371.                 newPassword: s
  372.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], true);
  373.             req.promise().then(v, A);
  374.             req.send()
  375.         },
  376.         changePassword: function (p, q, s, v) {
  377.             req = c.createRequest(false, "changePassword", {
  378.                 oldPassword: p,
  379.                 newPassword: q
  380.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true, true);
  381.             req.promise().then(s, v);
  382.             req.send()
  383.         },
  384.         registerUser: function (p, q, s, v, A, G, J, K, L, N, M) {
  385.             req = c.createRequest(false, "registerUser", {
  386.                 username: p,
  387.                 password: q,
  388.                 firstName: s,
  389.                 lastName: v,
  390.                 emailAddress: A,
  391.                 sex: G,
  392.                 birthDate: J,
  393.                 inviteID: K,
  394.                 savePassword: L
  395.             }, arguments[arguments.length - 1] === M ? {} : arguments[arguments.length - 1], true, true);
  396.             req.promise().then(N, M);
  397.             req.send()
  398.         },
  399.         userDisableAccount: function (p, q, s, v, A, G) {
  400.             req = c.createRequest(false, "userDisableAccount", {
  401.                 password: p,
  402.                 reason: q,
  403.                 details: s,
  404.                 contact: v
  405.             }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true, true);
  406.             req.promise().then(A, G);
  407.             req.send()
  408.         },
  409.         getIsUsernameEmailAvailable: function (p, q, s, v) {
  410.             req = c.createRequest(false, "getIsUsernameEmailAvailable", {
  411.                 username: p,
  412.                 emailAddress: q
  413.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  414.             req.promise().then(s, v);
  415.             req.send()
  416.         },
  417.         getUserByInviteID: function (p, q, s) {
  418.             req = c.createRequest(true, "getUserByInviteID", {
  419.                 inviteID: p
  420.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
  421.             req.promise().then(q, s);
  422.             req.send()
  423.         },
  424.         sendInvites: function (p, q, s) {
  425.             req = c.createRequest(false, "sendInvites", {
  426.                 emailAddresses: p
  427.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  428.             req.promise().then(q, s);
  429.             req.send()
  430.         },
  431.         getUserSettings: function (p, q) {
  432.             req = c.createRequest(false, "getUserSettings", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  433.             req.promise().then(p, q);
  434.             req.send()
  435.         },
  436.         changeUserInfoEx: function (p, q, s, v) {
  437.             req = c.createRequest(false, "changeUserInfoEx", {
  438.                 shitToChange: p,
  439.                 password: q
  440.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true);
  441.             req.promise().then(s, v);
  442.             req.send()
  443.         },
  444.         changeNotificationSettings: function (p, q, s) {
  445.             req = c.createRequest(false, "changeNotificationSettings", {
  446.                 newValue: p
  447.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  448.             req.promise().then(q, s);
  449.             req.send()
  450.         },
  451.         changePrivacySettings: function (p, q, s) {
  452.             req = c.createRequest(false, "changePrivacySettings", {
  453.                 newValue: p
  454.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  455.             req.promise().then(q, s);
  456.             req.send()
  457.         },
  458.         changeFeedSettings: function (p, q, s) {
  459.             req = c.createRequest(false, "changeFeedSettings", {
  460.                 newValue: p
  461.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  462.             req.promise().then(q, s);
  463.             req.send()
  464.         },
  465.         getSubscriptionDetails: function (p, q) {
  466.             req = c.createRequest(false, "getSubscriptionDetails", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
  467.             req.promise().then(p, q);
  468.             req.send()
  469.         },
  470.         userGetSongsInLibrary: function (p, q, s, v, A) {
  471.             q = _.orEqual(q, 0);
  472.             req = c.createRequest(s, "userGetSongsInLibrary", {
  473.                 userID: p,
  474.                 page: q
  475.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  476.             req.promise().then(v, A);
  477.             req.send()
  478.         },
  479.         userGetLibraryTSModified: function (p, q, s) {
  480.             req = c.createRequest(false, "userGetLibraryTSModified", {
  481.                 userID: p
  482.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  483.             req.promise().then(q, s);
  484.             req.send()
  485.         },
  486.         userAddSongsToLibrary: function (p, q, s) {
  487.             req = c.createRequest(false, "userAddSongsToLibrary", {
  488.                 songs: p
  489.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  490.             req.promise().then(q, s);
  491.             req.queue("library")
  492.         },
  493.         userRemoveSongFromLibrary: function (p, q, s, v, A, G) {
  494.             req = c.createRequest(false, "userRemoveSongFromLibrary", {
  495.                 userID: p,
  496.                 songID: q,
  497.                 albumID: s,
  498.                 artistID: v
  499.             }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1]);
  500.             req.promise().then(A, G);
  501.             req.queue("library")
  502.         },
  503.         getFavorites: function (p, q, s, v, A) {
  504.             q = q || "Songs";
  505.             req = c.createRequest(s, "getFavorites", {
  506.                 userID: p,
  507.                 ofWhat: q
  508.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  509.             req.promise().then(v, A);
  510.             req.send()
  511.         },
  512.         favorite: function (p, q, s, v, A) {
  513.             req = c.createRequest(false, "favorite", {
  514.                 what: p,
  515.                 ID: q,
  516.                 details: s
  517.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  518.             req.promise().then(v, A);
  519.             req.queue("library")
  520.         },
  521.         unfavorite: function (p, q, s, v) {
  522.             req = c.createRequest(false, "unfavorite", {
  523.                 what: p,
  524.                 ID: q
  525.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  526.             req.promise().then(s, v);
  527.             req.queue("library")
  528.         },
  529.         getUserSidebar: function (p, q) {
  530.             req = c.createRequest(false, "getUserSidebar", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  531.             req.promise().then(p, q);
  532.             req.send()
  533.         },
  534.         addShortcutToUserSidebar: function (p, q, s, v) {
  535.             req = c.createRequest(false, "addShortcutToUserSidebar", {
  536.                 what: p,
  537.                 id: q
  538.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  539.             req.promise().then(s, v);
  540.             req.queue("library")
  541.         },
  542.         removeShortcutFromUserSidebar: function (p, q, s, v) {
  543.             req = c.createRequest(false, "removeShortcutFromUserSidebar", {
  544.                 what: p,
  545.                 id: q
  546.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  547.             req.promise().then(s, v);
  548.             req.queue("library")
  549.         },
  550.         userGetPlaylists: function (p, q, s, v) {
  551.             req = c.createRequest(q, "userGetPlaylists", {
  552.                 userID: p
  553.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  554.             req.promise().then(s, v);
  555.             req.send()
  556.         },
  557.         createPlaylist: function (p, q, s, v, A) {
  558.             req = c.createRequest(false, "createPlaylist", {
  559.                 playlistName: p,
  560.                 songIDs: q,
  561.                 playlistAbout: s
  562.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  563.             req.promise().then(v, A);
  564.             req.send()
  565.         },
  566.         deletePlaylist: function (p, q, s, v) {
  567.             req = c.createRequest(false, "deletePlaylist", {
  568.                 playlistID: p,
  569.                 name: q
  570.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  571.             req.promise().then(s, v);
  572.             req.queue("playlist")
  573.         },
  574.         playlistUndelete: function (p, q, s) {
  575.             req = c.createRequest(false, "playlistUndelete", {
  576.                 playlistID: p
  577.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  578.             req.promise().then(q, s);
  579.             req.queue("playlist")
  580.         },
  581.         overwritePlaylist: function (p, q, s, v) {
  582.             req = c.createRequest(false, "overwritePlaylist", {
  583.                 playlistID: p,
  584.                 songIDs: q
  585.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  586.             req.promise().then(s, v);
  587.             req.queue("playlist")
  588.         },
  589.         playlistAddSongToExisting: function (p, q, s, v) {
  590.             req = c.createRequest(false, "playlistAddSongToExisting", {
  591.                 playlistID: p,
  592.                 songID: q
  593.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  594.             req.promise().then(s, v);
  595.             req.queue("playlist")
  596.         },
  597.         renamePlaylist: function (p, q, s, v) {
  598.             req = c.createRequest(false, "renamePlaylist", {
  599.                 playlistID: p,
  600.                 playlistName: q
  601.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  602.             req.promise().then(s, v);
  603.             req.queue("playlist")
  604.         },
  605.         setPlaylistAbout: function (p, q, s, v) {
  606.             req = c.createRequest(false, "setPlaylistAbout", {
  607.                 playlistID: p,
  608.                 about: q
  609.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  610.             req.promise().then(s, v);
  611.             req.queue("playlist")
  612.         },
  613.         getSearchResultsEx: function (p, q, s, v, A) {
  614.             req = c.createRequest(true, "getSearchResultsEx", {
  615.                 query: p,
  616.                 type: q,
  617.                 guts: GS.guts ? GS.guts.shouldLog : 0,
  618.                 ppOverride: s
  619.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  620.             req.promise().then(v, A);
  621.             req.send()
  622.         },
  623.         getSearchSuggestion: function (p, q, s) {
  624.             req = c.createRequest(true, "getSearchSuggestion", {
  625.                 query: p
  626.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  627.             req.promise().then(q, s);
  628.             req.send()
  629.         },
  630.         getArtistAutocomplete: function (p, q, s) {
  631.             req = c.createRequest(true, "getArtistAutocomplete", {
  632.                 query: p
  633.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  634.             req.promise().then(q, s);
  635.             req.send()
  636.         },
  637.         getProcessedUserFeedData: function (p, q, s, v) {
  638.             req = c.createRequest(true, "getProcessedUserFeedData", {
  639.                 userID: p,
  640.                 day: q
  641.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  642.             req.promise().then(s, v);
  643.             req.send()
  644.         },
  645.         getCombinedProcessedFeedData: function (p, q, s, v, A) {
  646.             req = c.createRequest(true, "getCombinedProcessedFeedData", {
  647.                 userIDs: p,
  648.                 day: q,
  649.                 loggedInUserID: s
  650.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  651.             req.promise().then(v, A);
  652.             req.send()
  653.         },
  654.         getRecentlyActiveUsers: function (p, q) {
  655.             req = c.createRequest(true, "getRecentlyActiveUsers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  656.             req.promise().then(p, q);
  657.             req.send()
  658.         },
  659.         feedsBanArtist: function (p, q, s) {
  660.             req = c.createRequest(false, "feedsBanArtist", {
  661.                 artistID: p
  662.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  663.             req.promise().then(q, s);
  664.             req.send()
  665.         },
  666.         feedsUnbanArtist: function (p, q, s) {
  667.             req = c.createRequest(false, "feedsUnbanArtist", {
  668.                 artistID: p
  669.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  670.             req.promise().then(q, s);
  671.             req.send()
  672.         },
  673.         feedsGetBannedArtists: function (p, q) {
  674.             req = c.createRequest(false, "feedsGetBannedArtists", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  675.             req.promise().then(p, q);
  676.             req.send()
  677.         },
  678.         feedsRemoveEventFromProfile: function (p, q, s, v) {
  679.             req = c.createRequest(false, "feedsRemoveEventFromProfile", {
  680.                 type: p,
  681.                 time: q
  682.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  683.             req.promise().then(s, v);
  684.             req.send()
  685.         },
  686.         removeItemFromCommunityFeed: function (p, q, s, v) {
  687.             req = c.createRequest(false, "removeItemFromCommunityFeed", {
  688.                 key: p,
  689.                 day: q
  690.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  691.             req.promise().then(s, v);
  692.             req.send()
  693.         },
  694.         changeFollowFlags: function (p, q, s) {
  695.             req = c.createRequest(false, "changeFollowFlags", {
  696.                 userIDsFlags: p
  697.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  698.             req.promise().then(q, s);
  699.             req.send()
  700.         },
  701.         getIsTargetingActive: function (p, q, s) {
  702.             req = c.createRequest(false, "getIsTargetingActive", {
  703.                 themeID: p
  704.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  705.             req.promise().then(q, s);
  706.             req.send()
  707.         },
  708.         logTargetedThemeImpression: function (p, q, s) {
  709.             req = c.createRequest(false, "logTargetedThemeImpression", {
  710.                 themeID: p
  711.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  712.             req.promise().then(q, s);
  713.             req.send()
  714.         },
  715.         logThemeOutboundLinkClick: function (p, q, s, v) {
  716.             req = c.createRequest(false, "logThemeOutboundLinkClick", {
  717.                 themeID: p,
  718.                 linkID: q
  719.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  720.             req.promise().then(s, v);
  721.             req.send()
  722.         },
  723.         provideSongFeedbackMessage: function (p, q, s, v) {
  724.             req = c.createRequest(false, "provideSongFeedbackMessage", {
  725.                 songID: p,
  726.                 message: q
  727.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  728.             req.promise().then(s, v);
  729.             req.send()
  730.         },
  731.         provideSongFeedbackVote: function (p, q, s, v, A) {
  732.             req = c.createRequest(false, "provideSongFeedbackVote", {
  733.                 songID: p,
  734.                 vote: q,
  735.                 artistID: s
  736.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  737.             req.promise().then(v, A);
  738.             req.send()
  739.         },
  740.         sendShare: function (p, q, s, v, A, G, J, K) {
  741.             req = c.createRequest(false, "sendShare", {
  742.                 what: p,
  743.                 ID: q,
  744.                 people: s,
  745.                 country: this.country,
  746.                 override: v,
  747.                 message: A
  748.             }, arguments[arguments.length - 1] === K ? {} : arguments[arguments.length - 1]);
  749.             req.promise().then(J, K);
  750.             if (G) req.overrideHeaders.privacy = 1;
  751.             this.country ? req.send() : this.callsPendingCountry.push(req);
  752.             GS.guts.logEvent("itemSharePerformed", {
  753.                 type: p,
  754.                 id: q
  755.             })
  756.         },
  757.         getContactInfoForFollowers: function (p, q) {
  758.             req = c.createRequest(false, "getContactInfoForFollowers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  759.             req.promise().then(p, q);
  760.             req.send()
  761.         },
  762.         artistGetSongkickEvents: function (p, q, s, v) {
  763.             req = c.createRequest(true, "artistGetSongkickEvents", {
  764.                 artistID: p,
  765.                 name: q
  766.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  767.             req.promise().then(s, v);
  768.             req.send()
  769.         },
  770.         getGoogleAuthToken: function (p, q, s, v) {
  771.             req = c.createRequest(false, "getGoogleAuthToken", {
  772.                 Email: p,
  773.                 Passwd: q,
  774.                 source: "EscapeMG-Grooveshark-" + this.clientRevision
  775.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true);
  776.             req.promise().then(s, v);
  777.             req.send()
  778.         },
  779.         getGoogleContacts: function (p, q, s) {
  780.             req = c.createRequest(false, "getGoogleContacts", {
  781.                 authToken: p
  782.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  783.             req.promise().then(q, s);
  784.             req.send()
  785.         },
  786.         getDetailsForBroadcast: function (p, q, s) {
  787.             req = c.createRequest(true, "getDetailsForBroadcast", {
  788.                 songID: p
  789.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  790.             req.promise().then(q, s);
  791.             req.send()
  792.         },
  793.         broadcastSong: function (p, q, s, v, A, G, J, K, L) {
  794.             req = c.createRequest(false, "broadcastSong", {
  795.                 songID: p,
  796.                 message: q,
  797.                 username: s,
  798.                 password: v,
  799.                 saveCredentials: A,
  800.                 service: G,
  801.                 song: J
  802.             }, arguments[arguments.length - 1] === L ? {} : arguments[arguments.length - 1], true);
  803.             req.promise().then(K, L);
  804.             req.send()
  805.         },
  806.         logBroadcast: function (p, q, s, v, A) {
  807.             req = c.createRequest(false, "logBroadcast", {
  808.                 type: p,
  809.                 item: q,
  810.                 service: s
  811.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  812.             req.promise().then(v, A);
  813.             req.send()
  814.         },
  815.         getUserFacebookData: function (p, q) {
  816.             req = c.createRequest(false, "getUserFacebookDataEx", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true);
  817.             req.promise().then(p, q);
  818.             req.send()
  819.         },
  820.         saveUserFacebookData: function (p, q, s, v, A, G, J) {
  821.             req = c.createRequest(false, "saveUserFacebookDataEx", {
  822.                 facebookUserID: p,
  823.                 sessionKey: q,
  824.                 accessToken1: s,
  825.                 accessToken3: v,
  826.                 flags: A
  827.             }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1], true, true);
  828.             req.promise().then(G, J);
  829.             req.send()
  830.         },
  831.         updateUserFacebookData: function (p, q, s, v, A, G, J) {
  832.             req = c.createRequest(false, "updateUserFacebookData", {
  833.                 facebookUserID: p,
  834.                 sessionKey: q,
  835.                 accessToken1: s,
  836.                 accessToken3: v,
  837.                 flags: A
  838.             }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1], true, true);
  839.             req.promise().then(G, J);
  840.             req.send()
  841.         },
  842.         removeUserFacebookData: function (p, q) {
  843.             req = c.createRequest(false, "removeUserFacebookData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  844.             req.promise().then(p, q);
  845.             req.send()
  846.         },
  847.         getUserGoogleData: function (p, q) {
  848.             req = c.createRequest(false, "getUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
  849.             req.promise().then(p, q);
  850.             req.send()
  851.         },
  852.         saveUserGoogleData: function (p, q) {
  853.             req = c.createRequest(false, "saveUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  854.             req.promise().then(p, q);
  855.             req.send()
  856.         },
  857.         removeUserGoogleData: function (p, q) {
  858.             req = c.createRequest(false, "removeUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  859.             req.promise().then(p, q);
  860.             req.send()
  861.         },
  862.         getUsernameSuggestions: function (p, q, s, v, A) {
  863.             req = c.createRequest(true, "getUsernameSuggestions", {
  864.                 baseUsername: p,
  865.                 fullName: q,
  866.                 idOrRand: s
  867.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  868.             req.promise().then(v, A);
  869.             req.send()
  870.         },
  871.         registerFacebookUser: function (p, q, s, v, A, G, J, K, L, N, M, P, O) {
  872.             req = c.createRequest(false, "registerFacebookUser", {
  873.                 username: p,
  874.                 firstName: q,
  875.                 emailAddress: s,
  876.                 sex: v,
  877.                 birthDate: A,
  878.                 inviteID: G,
  879.                 facebookUserID: J,
  880.                 sessionKey: K,
  881.                 accessToken1: L,
  882.                 accessToken3: N,
  883.                 flags: M
  884.             }, arguments[arguments.length - 1] === O ? {} : arguments[arguments.length - 1], true, true);
  885.             req.promise().then(P, O);
  886.             req.send()
  887.         },
  888.         getGroovesharkUsersFromFacebookUserIDs: function (p, q, s) {
  889.             req = c.createRequest(false, "getGroovesharkUsersFromFacebookUserIDs", {
  890.                 facebookUserIDs: p
  891.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  892.             req.promise().then(q, s);
  893.             req.send()
  894.         },
  895.         registerGoogleUser: function (p, q, s, v, A, G, J, K, L) {
  896.             req = c.createRequest(false, "registerGoogleUser", {
  897.                 flags: p,
  898.                 username: q,
  899.                 firstName: s,
  900.                 emailAddress: v,
  901.                 sex: A,
  902.                 birthDate: G,
  903.                 inviteID: J
  904.             }, arguments[arguments.length - 1] === L ? {} : arguments[arguments.length - 1], true, true);
  905.             req.promise().then(K, L);
  906.             req.send()
  907.         },
  908.         removeUserGoogleLogin: function (p, q) {
  909.             req = c.createRequest(false, "removeUserGoogleLogin", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  910.             req.promise().then(p, q);
  911.             req.send()
  912.         },
  913.         updateLastfmService: function (p, q, s, v, A, G, J) {
  914.             req = c.createRequest(false, "updateLastfmService", {
  915.                 session: p,
  916.                 token: q,
  917.                 username: s,
  918.                 flagsAdd: v,
  919.                 flagsRemove: A
  920.             }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1]);
  921.             req.promise().then(G, J);
  922.             req.send()
  923.         },
  924.         getLastfmService: function (p, q) {
  925.             req = c.createRequest(false, "getLastfmService", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  926.             req.promise().then(p, q);
  927.             req.send()
  928.         },
  929.         removeLastfmService: function (p, q) {
  930.             req = c.createRequest(false, "removeLastfmService", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  931.             req.promise().then(p, q);
  932.             req.send()
  933.         },
  934.         getAffiliateDownloadURLs: function (p, q, s, v) {
  935.             req = c.createRequest(false, "getAffiliateDownloadURLs", {
  936.                 songName: p,
  937.                 artistName: q
  938.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  939.             req.promise().then(s, v);
  940.             req.send()
  941.         },
  942.         getYoutubeSearchResults: function (p, q, s, v, A) {
  943.             req = c.createRequest(true, "getYoutubeSearchResults", {
  944.                 query: p,
  945.                 options: q
  946.             }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
  947.             req.promise().then(v, A);
  948.             req.send()
  949.         },
  950.         getServiceStatus: function (p, q) {
  951.             req = c.createRequest(false, "getServiceStatus", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  952.             req.promise().then(p, q);
  953.             req.send()
  954.         },
  955.         provideVIPFeedback: function (p, q, s, v) {
  956.             req = c.createRequest(false, "provideVIPFeedback", {
  957.                 fromAddress: p,
  958.                 message: q
  959.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  960.             req.promise().then(s, v);
  961.             req.send()
  962.         },
  963.         getEmailAddress: function (p, q) {
  964.             req = c.createRequest(false, "getEmailAddress", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  965.             req.promise().then(p, q);
  966.             req.send()
  967.         },
  968.         sendMobileAppSMS: function (p, q, s, v, A, G) {
  969.             req = c.createRequest(false, "sendMobileAppSMS", {
  970.                 phoneNumber: p,
  971.                 platform: q,
  972.                 callingCode: s,
  973.                 country: v
  974.             }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1]);
  975.             req.promise().then(A, G);
  976.             req.send()
  977.         },
  978.         getCountryFromRequestIP: function (p, q) {
  979.             req = c.createRequest(true, "getCountryFromRequestIP", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  980.             req.promise().then(p, q);
  981.             req.send()
  982.         },
  983.         artistGetSimilarArtists: function (p, q, s) {
  984.             req = c.createRequest(true, "artistGetSimilarArtists", {
  985.                 artistID: p
  986.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  987.             req.promise().then(q, s);
  988.             req.send()
  989.         },
  990.         getThemeFromDFP: function (p, q, s) {
  991.             req = c.createRequest(false, "getThemeFromDFP", {
  992.                 paramString: p
  993.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  994.             req.type = "dfp";
  995.             req.promise().then(q, s);
  996.             req.send()
  997.         },
  998.         getNotificationFromDFP: function (p, q, s) {
  999.             req = c.createRequest(false, "getNotificationFromDFP", {
  1000.                 paramString: p
  1001.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
  1002.             req.type = "dfp";
  1003.             req.promise().then(q, s);
  1004.             req.send()
  1005.         },
  1006.         getItemByPageName: function (p, q, s) {
  1007.             req = c.createRequest(false, "getItemByPageName", {
  1008.                 name: p
  1009.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
  1010.             req.promise().then(q, s);
  1011.             req.send()
  1012.         },
  1013.         getPageNameByIDType: function (p, q, s, v) {
  1014.             req = c.createRequest(false, "getPageNameByIDType", {
  1015.                 id: p,
  1016.                 type: q
  1017.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
  1018.             req.promise().then(s, v);
  1019.             req.promise().then(function (A) {
  1020.                 A.name && window.GS && GS.router && GS.router.cachePageName(A.name, q, p)
  1021.             });
  1022.             req.send()
  1023.         },
  1024.         userGetPoints: function (p, q) {
  1025.             req = c.createRequest(false, "userGetPoints", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
  1026.             req.promise().then(p, q);
  1027.             req.send()
  1028.         },
  1029.         getClearvoiceMemberInfo: function (p, q) {
  1030.             req = c.createRequest(false, "getClearvoiceMemberInfo", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true);
  1031.             req.promise().then(p, q);
  1032.             req.send()
  1033.         },
  1034.         saveClearvoiceMemberInfo: function (p, q, s, v, A, G) {
  1035.             req = c.createRequest(false, "saveClearvoiceMemberInfo", {
  1036.                 guid: p,
  1037.                 fName: q,
  1038.                 lName: s,
  1039.                 email: v
  1040.             }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true);
  1041.             req.promise().then(A, G);
  1042.             req.send()
  1043.         },
  1044.         addClearvoiceAnswers: function (p, q, s) {
  1045.             req = c.createRequest(false, "addClearvoiceAnswers", {
  1046.                 questionsAndAnswers: p
  1047.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
  1048.             req.promise().then(q, s);
  1049.             req.send()
  1050.         },
  1051.         submitPlaylistForCampaign: function (p, q, s, v) {
  1052.             req = new c("submitPlaylistForCampaign", {
  1053.                 playlistID: p,
  1054.                 campaignID: q
  1055.             }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], false);
  1056.             req.promise().then(s, v);
  1057.             req.send()
  1058.         },
  1059.         getPlaylistsForCampaign: function (p, q, s) {
  1060.             req = new c("getPlaylistsForCampaign", {
  1061.                 campaignID: p
  1062.             }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false);
  1063.             req.promise().then(q, s);
  1064.             req.send()
  1065.         },
  1066.         getTunipopID: function (p, q, s, v) {
  1067.             var A = arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1],
  1068.                 G = {};
  1069.             if (q) G.brand = p;
  1070.             else G.artist = p;
  1071.             req = c.createRequest(true, "getTunipopID", G, A, null, true);
  1072.             req.type = "tunipop";
  1073.             req.promise().then(s, v);
  1074.             req.send()
  1075.         }
  1076.     })
  1077. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement