Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.Class.extend("GS.Controllers.ServiceController", {
- configDefaults: {
- hostname: window.location.host,
- sessionID: null,
- client: "htmlshark",
- clientRevision: "20101222",
- revToken: "quitStealinMahShit",
- country: null,
- privacy: 0,
- uuID: "",
- defaultEndpoint: "more.php"
- },
- instance: function () {
- H || (H = new GS.Controllers.ServiceController({
- hostname: window.location.host,
- sessionID: gsConfig.sessionID,
- clientRevision: gsConfig.revision,
- country: gsConfig.country,
- privacy: gsConfig.user.Privacy,
- uuID: gsConfig.uuid,
- defaultEndpoint: gsConfig.endpoint
- }));
- return H
- }
- }, {
- faultCodes: {
- INVALID_CLIENT: 1024,
- RATE_LIMITED: 512,
- INVALID_TOKEN: 256,
- INVALID_SESSION: 16,
- MAINTENANCE: 10,
- MUST_BE_LOGGED_IN: 8,
- HTTP_TIMEOUT: 6,
- PARSE_ERROR: 4,
- HTTP_ERROR: 2,
- EMPTY_RESULT: -256
- },
- init: function (p) {
- $.extend(this, GS.Controllers.ServiceController.configDefaults, p);
- this.currentToken = null;
- this.tokenExpires = 0;
- this.lastTokenFailed = this.tokenPending = false;
- this.reauthPending = this.lastRandomizer = null;
- this.downForMaintenance = false;
- this.lastDowntimeNotification = 0;
- this.callsPendingToken = [];
- this.callsPendingAuth = [];
- this.callsPendingCountry = [];
- this.callsPendingSWF = [];
- this.outgoingSWFCalls = {};
- this.swfProxy = null;
- this.sessionID || c.createRequest(false, "initiateSession", {}, {
- async: false
- }).send();
- var q = c.createRequest(false, "getCountry");
- q.faultFilters.push(function () {
- return false
- });
- q.promise().then(this.callback(C), this.callback(C));
- this.country ? q.resolve(this.country) : _.wait(1).then(function () {
- q.send()
- })
- },
- serviceExists: function () {
- return true
- },
- swfReady: function () {
- for (var p; this.callsPendingSWF.length;) {
- p = this.callsPendingSWF.shift();
- p.send()
- }
- return true
- },
- swfBadHost: function () {
- GS.lightbox.open("badHost")
- },
- swfSuccess: function (p, q) {
- var s = this.outgoingSWFCalls[q];
- s && r(p, s);
- delete this.outgoingSWFCalls[q]
- },
- swfFault: function (p, q) {
- var s = this.outgoingSWFCalls[q];
- s && t(p, s);
- delete this.outgoingSWFCalls[q]
- },
- swfNeedsToken: function () {
- w()
- },
- onChatData: function (p) {
- console.log("Got chat data:", p)
- },
- onChatError: function (p) {
- console.log("Got chat error, event:", p)
- },
- httpsFormSubmit: function (p, q) {
- var s = $("#httpsForm");
- $("#httpsIframe");
- var v = [];
- s.html("");
- s.attr("action", p);
- s.attr("method", "post");
- s.attr("target", "httpsIframe");
- s.attr("enctype", "multipart/form-data");
- _.forEach(q, function (A, G) {
- v.push('<input type="hidden" name="' + G + '" value="' + A + '" />')
- });
- s.append(v.join(""));
- s.submit()
- },
- isFirstVisit: function (p) {
- req = c.createRequest(false, "isFirstVisit", {}, {}, false, true);
- req.promise().then(p);
- req.send()
- },
- makeFacebookRequest: function (p, q, s, v, A) {
- req = g.createRequest(false, p, q, s);
- req.promise().then(v, A);
- req.send()
- },
- lastfmHandshake: function (p, q, s) {
- req = h.createRequest(false, "handshake", p);
- req.promise().then(q, s);
- req.send()
- },
- lastfmNowPlaying: function (p, q, s) {
- req = h.createRequest(false, "nowPlaying", p);
- req.promise().then(q, s);
- req.send()
- },
- lastfmSongPlay: function (p, q, s) {
- req = h.createRequest(false, "submission", p);
- req.promise().then(q, s);
- req.send()
- },
- rapleafPersonalize: function (p, q, s) {
- req = c.createRequest(false, "personalize", {
- redirectURL: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.type = "rapleaf";
- req.promise().then(q, s);
- req.send()
- },
- rapleafDirect: function (p, q, s) {
- req = c.createRequest(false, "direct", {
- email: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.type = "rapleaf";
- req.promise().then(q, s);
- req.send()
- },
- getAlbumByID: function (p, q, s) {
- req = c.createRequest(true, "getAlbumByID", {
- albumID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getArtistByID: function (p, q, s) {
- req = c.createRequest(true, "getArtistByID", {
- artistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getPlaylistByID: function (p, q, s) {
- req = c.createRequest(true, "getPlaylistByID", {
- playlistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getQueueSongListFromSongIDs: function (p, q, s) {
- req = c.createRequest(true, "getQueueSongListFromSongIDs", {
- songIDs: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getSongFromToken: function (p, q, s) {
- req = c.createRequest(true, "getSongFromToken", {
- token: p,
- country: this.country
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- this.country ? req.send() : this.callsPendingCountry.push(req)
- },
- getTokenForSong: function (p, q, s) {
- req = c.createRequest(true, "getTokenForSong", {
- songID: p,
- country: this.country
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- this.country ? req.send() : this.callsPendingCountry.push(req)
- },
- getUserByID: function (p, q, s) {
- req = c.createRequest(true, "getUserByID", {
- userID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- albumGetSongs: function (p, q, s, v, A) {
- q = _.orEqual(q, true);
- s = _.orEqual(s, 0);
- req = c.createRequest(true, "albumGetSongs", {
- albumID: p,
- isVerified: q,
- offset: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- artistGetAlbums: function (p, q, s, v, A) {
- req = c.createRequest(true, "artistGetAlbums", {
- artistID: p,
- isVerified: q,
- offset: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- artistGetSongsEx: function (p, q, s, v) {
- req = c.createRequest(true, "artistGetSongsEx", {
- artistID: p,
- isVerifiedOrPopular: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- playlistGetSongs: function (p, q, s) {
- req = c.createRequest(true, "playlistGetSongs", {
- playlistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- popularGetSongs: function (p, q, s) {
- var v = arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1];
- ({
- daily: true,
- weekly: true,
- monthly: true
- })[p] || (p = "daily");
- req = c.createRequest(true, "popularGetSongs", {
- type: p
- }, v);
- req.promise().then(q, s);
- req.send()
- },
- getArtistsForTagRadio: function (p, q, s) {
- req = c.createRequest(true, "getArtistsForTagRadio", {
- tagID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- albumGetFans: function (p, q, s, v) {
- req = c.createRequest(true, "albumGetFans", {
- albumID: p,
- offset: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- artistGetFans: function (p, q, s, v) {
- req = c.createRequest(true, "artistGetFans", {
- artistID: p,
- offset: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- playlistGetFans: function (p, q, s) {
- req = c.createRequest(true, "playlistGetFans", {
- playlistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- songGetFans: function (p, q, s, v) {
- req = c.createRequest(true, "songGetFans", {
- songID: p,
- offset: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- userGetFans: function (p, q, s, v) {
- req = c.createRequest(true, "userGetFans", {
- userID: p,
- offset: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- authenticateUser: function (p, q, s, v, A) {
- req = c.createRequest(false, "authenticateUser", {
- username: p,
- password: q,
- savePassword: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(v, A);
- req.send()
- },
- authenticateFacebookUser: function (p, q, s, v, A, G) {
- req = c.createRequest(false, "authenticateFacebookUser", {
- facebookUserID: p,
- sessionKey: q,
- accessToken1: s,
- accessToken3: v
- }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(A, G);
- req.send()
- },
- authenticateGoogleUser: function (p, q) {
- req = c.createRequest(false, "authenticateGoogleUser", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(p, q);
- req.send()
- },
- getStoredUsers: function (p, q) {
- req = c.createRequest(false, "getStoredUsers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(p, q);
- req.send()
- },
- deleteStoredUser: function (p, q, s) {
- req = c.createRequest(false, "deleteStoredUser", {
- username: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(q, s);
- req.send()
- },
- loginStoredUser: function (p, q, s) {
- req = c.createRequest(false, "loginStoredUser", {
- username: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(q, s);
- req.send()
- },
- reportUserChange: function (p, q, s, v, A) {
- req = c.createRequest(false, "reportUserChange", {
- userID: p,
- email: q,
- username: "",
- privacy: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(v, A);
- req.send()
- },
- killAuthToken: function (p, q) {
- req = c.createRequest(false, "killAuthToken", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(p, q);
- req.send()
- },
- logoutUser: function (p, q) {
- req = c.createRequest(false, "logoutUser", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(p, q);
- req.send()
- },
- userForgotPassword: function (p, q, s) {
- req = c.createRequest(false, "userForgotPassword", {
- usernameOrEmail: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
- req.promise().then(q, s);
- req.send()
- },
- resetPassword: function (p, q, s, v, A) {
- req = c.createRequest(false, "resetPassword", {
- usernameOrEmail: p,
- secretResetCode: q,
- newPassword: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1], true);
- req.promise().then(v, A);
- req.send()
- },
- changePassword: function (p, q, s, v) {
- req = c.createRequest(false, "changePassword", {
- oldPassword: p,
- newPassword: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(s, v);
- req.send()
- },
- registerUser: function (p, q, s, v, A, G, J, K, L, N, M) {
- req = c.createRequest(false, "registerUser", {
- username: p,
- password: q,
- firstName: s,
- lastName: v,
- emailAddress: A,
- sex: G,
- birthDate: J,
- inviteID: K,
- savePassword: L
- }, arguments[arguments.length - 1] === M ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(N, M);
- req.send()
- },
- userDisableAccount: function (p, q, s, v, A, G) {
- req = c.createRequest(false, "userDisableAccount", {
- password: p,
- reason: q,
- details: s,
- contact: v
- }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(A, G);
- req.send()
- },
- getIsUsernameEmailAvailable: function (p, q, s, v) {
- req = c.createRequest(false, "getIsUsernameEmailAvailable", {
- username: p,
- emailAddress: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- getUserByInviteID: function (p, q, s) {
- req = c.createRequest(true, "getUserByInviteID", {
- inviteID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
- req.promise().then(q, s);
- req.send()
- },
- sendInvites: function (p, q, s) {
- req = c.createRequest(false, "sendInvites", {
- emailAddresses: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getUserSettings: function (p, q) {
- req = c.createRequest(false, "getUserSettings", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- changeUserInfoEx: function (p, q, s, v) {
- req = c.createRequest(false, "changeUserInfoEx", {
- shitToChange: p,
- password: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true);
- req.promise().then(s, v);
- req.send()
- },
- changeNotificationSettings: function (p, q, s) {
- req = c.createRequest(false, "changeNotificationSettings", {
- newValue: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- changePrivacySettings: function (p, q, s) {
- req = c.createRequest(false, "changePrivacySettings", {
- newValue: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- changeFeedSettings: function (p, q, s) {
- req = c.createRequest(false, "changeFeedSettings", {
- newValue: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getSubscriptionDetails: function (p, q) {
- req = c.createRequest(false, "getSubscriptionDetails", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(p, q);
- req.send()
- },
- userGetSongsInLibrary: function (p, q, s, v, A) {
- q = _.orEqual(q, 0);
- req = c.createRequest(s, "userGetSongsInLibrary", {
- userID: p,
- page: q
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- userGetLibraryTSModified: function (p, q, s) {
- req = c.createRequest(false, "userGetLibraryTSModified", {
- userID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- userAddSongsToLibrary: function (p, q, s) {
- req = c.createRequest(false, "userAddSongsToLibrary", {
- songs: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.queue("library")
- },
- userRemoveSongFromLibrary: function (p, q, s, v, A, G) {
- req = c.createRequest(false, "userRemoveSongFromLibrary", {
- userID: p,
- songID: q,
- albumID: s,
- artistID: v
- }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1]);
- req.promise().then(A, G);
- req.queue("library")
- },
- getFavorites: function (p, q, s, v, A) {
- q = q || "Songs";
- req = c.createRequest(s, "getFavorites", {
- userID: p,
- ofWhat: q
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- favorite: function (p, q, s, v, A) {
- req = c.createRequest(false, "favorite", {
- what: p,
- ID: q,
- details: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.queue("library")
- },
- unfavorite: function (p, q, s, v) {
- req = c.createRequest(false, "unfavorite", {
- what: p,
- ID: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("library")
- },
- getUserSidebar: function (p, q) {
- req = c.createRequest(false, "getUserSidebar", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- addShortcutToUserSidebar: function (p, q, s, v) {
- req = c.createRequest(false, "addShortcutToUserSidebar", {
- what: p,
- id: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("library")
- },
- removeShortcutFromUserSidebar: function (p, q, s, v) {
- req = c.createRequest(false, "removeShortcutFromUserSidebar", {
- what: p,
- id: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("library")
- },
- userGetPlaylists: function (p, q, s, v) {
- req = c.createRequest(q, "userGetPlaylists", {
- userID: p
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- createPlaylist: function (p, q, s, v, A) {
- req = c.createRequest(false, "createPlaylist", {
- playlistName: p,
- songIDs: q,
- playlistAbout: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- deletePlaylist: function (p, q, s, v) {
- req = c.createRequest(false, "deletePlaylist", {
- playlistID: p,
- name: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("playlist")
- },
- playlistUndelete: function (p, q, s) {
- req = c.createRequest(false, "playlistUndelete", {
- playlistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.queue("playlist")
- },
- overwritePlaylist: function (p, q, s, v) {
- req = c.createRequest(false, "overwritePlaylist", {
- playlistID: p,
- songIDs: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("playlist")
- },
- playlistAddSongToExisting: function (p, q, s, v) {
- req = c.createRequest(false, "playlistAddSongToExisting", {
- playlistID: p,
- songID: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("playlist")
- },
- renamePlaylist: function (p, q, s, v) {
- req = c.createRequest(false, "renamePlaylist", {
- playlistID: p,
- playlistName: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("playlist")
- },
- setPlaylistAbout: function (p, q, s, v) {
- req = c.createRequest(false, "setPlaylistAbout", {
- playlistID: p,
- about: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.queue("playlist")
- },
- getSearchResultsEx: function (p, q, s, v, A) {
- req = c.createRequest(true, "getSearchResultsEx", {
- query: p,
- type: q,
- guts: GS.guts ? GS.guts.shouldLog : 0,
- ppOverride: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- getSearchSuggestion: function (p, q, s) {
- req = c.createRequest(true, "getSearchSuggestion", {
- query: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getArtistAutocomplete: function (p, q, s) {
- req = c.createRequest(true, "getArtistAutocomplete", {
- query: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getProcessedUserFeedData: function (p, q, s, v) {
- req = c.createRequest(true, "getProcessedUserFeedData", {
- userID: p,
- day: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- getCombinedProcessedFeedData: function (p, q, s, v, A) {
- req = c.createRequest(true, "getCombinedProcessedFeedData", {
- userIDs: p,
- day: q,
- loggedInUserID: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- getRecentlyActiveUsers: function (p, q) {
- req = c.createRequest(true, "getRecentlyActiveUsers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- feedsBanArtist: function (p, q, s) {
- req = c.createRequest(false, "feedsBanArtist", {
- artistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- feedsUnbanArtist: function (p, q, s) {
- req = c.createRequest(false, "feedsUnbanArtist", {
- artistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- feedsGetBannedArtists: function (p, q) {
- req = c.createRequest(false, "feedsGetBannedArtists", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- feedsRemoveEventFromProfile: function (p, q, s, v) {
- req = c.createRequest(false, "feedsRemoveEventFromProfile", {
- type: p,
- time: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- removeItemFromCommunityFeed: function (p, q, s, v) {
- req = c.createRequest(false, "removeItemFromCommunityFeed", {
- key: p,
- day: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- changeFollowFlags: function (p, q, s) {
- req = c.createRequest(false, "changeFollowFlags", {
- userIDsFlags: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getIsTargetingActive: function (p, q, s) {
- req = c.createRequest(false, "getIsTargetingActive", {
- themeID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- logTargetedThemeImpression: function (p, q, s) {
- req = c.createRequest(false, "logTargetedThemeImpression", {
- themeID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- logThemeOutboundLinkClick: function (p, q, s, v) {
- req = c.createRequest(false, "logThemeOutboundLinkClick", {
- themeID: p,
- linkID: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- provideSongFeedbackMessage: function (p, q, s, v) {
- req = c.createRequest(false, "provideSongFeedbackMessage", {
- songID: p,
- message: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- provideSongFeedbackVote: function (p, q, s, v, A) {
- req = c.createRequest(false, "provideSongFeedbackVote", {
- songID: p,
- vote: q,
- artistID: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- sendShare: function (p, q, s, v, A, G, J, K) {
- req = c.createRequest(false, "sendShare", {
- what: p,
- ID: q,
- people: s,
- country: this.country,
- override: v,
- message: A
- }, arguments[arguments.length - 1] === K ? {} : arguments[arguments.length - 1]);
- req.promise().then(J, K);
- if (G) req.overrideHeaders.privacy = 1;
- this.country ? req.send() : this.callsPendingCountry.push(req);
- GS.guts.logEvent("itemSharePerformed", {
- type: p,
- id: q
- })
- },
- getContactInfoForFollowers: function (p, q) {
- req = c.createRequest(false, "getContactInfoForFollowers", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- artistGetSongkickEvents: function (p, q, s, v) {
- req = c.createRequest(true, "artistGetSongkickEvents", {
- artistID: p,
- name: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- getGoogleAuthToken: function (p, q, s, v) {
- req = c.createRequest(false, "getGoogleAuthToken", {
- Email: p,
- Passwd: q,
- source: "EscapeMG-Grooveshark-" + this.clientRevision
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], true);
- req.promise().then(s, v);
- req.send()
- },
- getGoogleContacts: function (p, q, s) {
- req = c.createRequest(false, "getGoogleContacts", {
- authToken: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.promise().then(q, s);
- req.send()
- },
- getDetailsForBroadcast: function (p, q, s) {
- req = c.createRequest(true, "getDetailsForBroadcast", {
- songID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- broadcastSong: function (p, q, s, v, A, G, J, K, L) {
- req = c.createRequest(false, "broadcastSong", {
- songID: p,
- message: q,
- username: s,
- password: v,
- saveCredentials: A,
- service: G,
- song: J
- }, arguments[arguments.length - 1] === L ? {} : arguments[arguments.length - 1], true);
- req.promise().then(K, L);
- req.send()
- },
- logBroadcast: function (p, q, s, v, A) {
- req = c.createRequest(false, "logBroadcast", {
- type: p,
- item: q,
- service: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- getUserFacebookData: function (p, q) {
- req = c.createRequest(false, "getUserFacebookDataEx", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true);
- req.promise().then(p, q);
- req.send()
- },
- saveUserFacebookData: function (p, q, s, v, A, G, J) {
- req = c.createRequest(false, "saveUserFacebookDataEx", {
- facebookUserID: p,
- sessionKey: q,
- accessToken1: s,
- accessToken3: v,
- flags: A
- }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(G, J);
- req.send()
- },
- updateUserFacebookData: function (p, q, s, v, A, G, J) {
- req = c.createRequest(false, "updateUserFacebookData", {
- facebookUserID: p,
- sessionKey: q,
- accessToken1: s,
- accessToken3: v,
- flags: A
- }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(G, J);
- req.send()
- },
- removeUserFacebookData: function (p, q) {
- req = c.createRequest(false, "removeUserFacebookData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- getUserGoogleData: function (p, q) {
- req = c.createRequest(false, "getUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(p, q);
- req.send()
- },
- saveUserGoogleData: function (p, q) {
- req = c.createRequest(false, "saveUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- removeUserGoogleData: function (p, q) {
- req = c.createRequest(false, "removeUserGoogleData", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- getUsernameSuggestions: function (p, q, s, v, A) {
- req = c.createRequest(true, "getUsernameSuggestions", {
- baseUsername: p,
- fullName: q,
- idOrRand: s
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- registerFacebookUser: function (p, q, s, v, A, G, J, K, L, N, M, P, O) {
- req = c.createRequest(false, "registerFacebookUser", {
- username: p,
- firstName: q,
- emailAddress: s,
- sex: v,
- birthDate: A,
- inviteID: G,
- facebookUserID: J,
- sessionKey: K,
- accessToken1: L,
- accessToken3: N,
- flags: M
- }, arguments[arguments.length - 1] === O ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(P, O);
- req.send()
- },
- getGroovesharkUsersFromFacebookUserIDs: function (p, q, s) {
- req = c.createRequest(false, "getGroovesharkUsersFromFacebookUserIDs", {
- facebookUserIDs: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- registerGoogleUser: function (p, q, s, v, A, G, J, K, L) {
- req = c.createRequest(false, "registerGoogleUser", {
- flags: p,
- username: q,
- firstName: s,
- emailAddress: v,
- sex: A,
- birthDate: G,
- inviteID: J
- }, arguments[arguments.length - 1] === L ? {} : arguments[arguments.length - 1], true, true);
- req.promise().then(K, L);
- req.send()
- },
- removeUserGoogleLogin: function (p, q) {
- req = c.createRequest(false, "removeUserGoogleLogin", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- updateLastfmService: function (p, q, s, v, A, G, J) {
- req = c.createRequest(false, "updateLastfmService", {
- session: p,
- token: q,
- username: s,
- flagsAdd: v,
- flagsRemove: A
- }, arguments[arguments.length - 1] === J ? {} : arguments[arguments.length - 1]);
- req.promise().then(G, J);
- req.send()
- },
- getLastfmService: function (p, q) {
- req = c.createRequest(false, "getLastfmService", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- removeLastfmService: function (p, q) {
- req = c.createRequest(false, "removeLastfmService", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- getAffiliateDownloadURLs: function (p, q, s, v) {
- req = c.createRequest(false, "getAffiliateDownloadURLs", {
- songName: p,
- artistName: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- getYoutubeSearchResults: function (p, q, s, v, A) {
- req = c.createRequest(true, "getYoutubeSearchResults", {
- query: p,
- options: q
- }, arguments[arguments.length - 1] === A ? {} : arguments[arguments.length - 1]);
- req.promise().then(v, A);
- req.send()
- },
- getServiceStatus: function (p, q) {
- req = c.createRequest(false, "getServiceStatus", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- provideVIPFeedback: function (p, q, s, v) {
- req = c.createRequest(false, "provideVIPFeedback", {
- fromAddress: p,
- message: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.send()
- },
- getEmailAddress: function (p, q) {
- req = c.createRequest(false, "getEmailAddress", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- sendMobileAppSMS: function (p, q, s, v, A, G) {
- req = c.createRequest(false, "sendMobileAppSMS", {
- phoneNumber: p,
- platform: q,
- callingCode: s,
- country: v
- }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1]);
- req.promise().then(A, G);
- req.send()
- },
- getCountryFromRequestIP: function (p, q) {
- req = c.createRequest(true, "getCountryFromRequestIP", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- artistGetSimilarArtists: function (p, q, s) {
- req = c.createRequest(true, "artistGetSimilarArtists", {
- artistID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getThemeFromDFP: function (p, q, s) {
- req = c.createRequest(false, "getThemeFromDFP", {
- paramString: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.type = "dfp";
- req.promise().then(q, s);
- req.send()
- },
- getNotificationFromDFP: function (p, q, s) {
- req = c.createRequest(false, "getNotificationFromDFP", {
- paramString: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false, true);
- req.type = "dfp";
- req.promise().then(q, s);
- req.send()
- },
- getItemByPageName: function (p, q, s) {
- req = c.createRequest(false, "getItemByPageName", {
- name: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1]);
- req.promise().then(q, s);
- req.send()
- },
- getPageNameByIDType: function (p, q, s, v) {
- req = c.createRequest(false, "getPageNameByIDType", {
- id: p,
- type: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1]);
- req.promise().then(s, v);
- req.promise().then(function (A) {
- A.name && window.GS && GS.router && GS.router.cachePageName(A.name, q, p)
- });
- req.send()
- },
- userGetPoints: function (p, q) {
- req = c.createRequest(false, "userGetPoints", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1]);
- req.promise().then(p, q);
- req.send()
- },
- getClearvoiceMemberInfo: function (p, q) {
- req = c.createRequest(false, "getClearvoiceMemberInfo", {}, arguments[arguments.length - 1] === q ? {} : arguments[arguments.length - 1], true);
- req.promise().then(p, q);
- req.send()
- },
- saveClearvoiceMemberInfo: function (p, q, s, v, A, G) {
- req = c.createRequest(false, "saveClearvoiceMemberInfo", {
- guid: p,
- fName: q,
- lName: s,
- email: v
- }, arguments[arguments.length - 1] === G ? {} : arguments[arguments.length - 1], true);
- req.promise().then(A, G);
- req.send()
- },
- addClearvoiceAnswers: function (p, q, s) {
- req = c.createRequest(false, "addClearvoiceAnswers", {
- questionsAndAnswers: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], true);
- req.promise().then(q, s);
- req.send()
- },
- submitPlaylistForCampaign: function (p, q, s, v) {
- req = new c("submitPlaylistForCampaign", {
- playlistID: p,
- campaignID: q
- }, arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1], false);
- req.promise().then(s, v);
- req.send()
- },
- getPlaylistsForCampaign: function (p, q, s) {
- req = new c("getPlaylistsForCampaign", {
- campaignID: p
- }, arguments[arguments.length - 1] === s ? {} : arguments[arguments.length - 1], false);
- req.promise().then(q, s);
- req.send()
- },
- getTunipopID: function (p, q, s, v) {
- var A = arguments[arguments.length - 1] === v ? {} : arguments[arguments.length - 1],
- G = {};
- if (q) G.brand = p;
- else G.artist = p;
- req = c.createRequest(true, "getTunipopID", G, A, null, true);
- req.type = "tunipop";
- req.promise().then(s, v);
- req.send()
- }
- })
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement