@widgetic/editor 3.10.37 → 3.10.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dev/editor.js +11 -18
- package/lib/editor.js +1 -1
- package/package.json +1 -1
- package/src/editor/content/service/soundcloud.coffee +23 -17
package/lib/dev/editor.js
CHANGED
|
@@ -13347,7 +13347,7 @@ WidgetEditor = (function(superClass) {
|
|
|
13347
13347
|
this.el.append(this.tabs.el);
|
|
13348
13348
|
LoginPopup.place(this.el);
|
|
13349
13349
|
Blogvio.pubsub.subscribe('api/token/update', this._updateLoggedInStatus);
|
|
13350
|
-
this.el.attr('editorVersion', "3.10.
|
|
13350
|
+
this.el.attr('editorVersion', "3.10.38");
|
|
13351
13351
|
}
|
|
13352
13352
|
|
|
13353
13353
|
|
|
@@ -23636,7 +23636,7 @@ module.exports = InstagramService;
|
|
|
23636
23636
|
/* 170 */
|
|
23637
23637
|
/***/ (function(module, exports, __webpack_require__) {
|
|
23638
23638
|
|
|
23639
|
-
var Entry, SC, Service, SoundCloudService, config,
|
|
23639
|
+
var Entry, SC, Service, SoundCloudService, config, widgetic_backend_url,
|
|
23640
23640
|
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
|
23641
23641
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
23642
23642
|
hasProp = {}.hasOwnProperty;
|
|
@@ -23645,23 +23645,26 @@ Service = __webpack_require__(8);
|
|
|
23645
23645
|
|
|
23646
23646
|
Entry = __webpack_require__(9);
|
|
23647
23647
|
|
|
23648
|
+
widgetic_backend_url = 'https://widgetic.com/wservices/soundcloud/';
|
|
23649
|
+
|
|
23648
23650
|
SC = __webpack_require__(171);
|
|
23649
23651
|
|
|
23650
23652
|
config = {
|
|
23653
|
+
api_url: 'https://api.soundcloud.com',
|
|
23651
23654
|
client_id: 'aed0aa63baf747a83ad0b6b246acddca',
|
|
23652
|
-
redirect_uri: '
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
+
redirect_uri: widgetic_backend_url + 'connect',
|
|
23656
|
+
tracks_url: widgetic_backend_url + 'tracks',
|
|
23657
|
+
grant_type: 'refresh_token'
|
|
23655
23658
|
};
|
|
23656
23659
|
|
|
23657
23660
|
SC.initialize(config);
|
|
23658
23661
|
|
|
23659
23662
|
SC.client_id = config.client_id;
|
|
23660
23663
|
|
|
23661
|
-
SC.redirect_uri = config.redirect_uri;
|
|
23662
|
-
|
|
23663
23664
|
SC.api_url = config.api_url;
|
|
23664
23665
|
|
|
23666
|
+
SC.tracks_url = config.tracks_url;
|
|
23667
|
+
|
|
23665
23668
|
try {
|
|
23666
23669
|
SC.auth_token = localStorage.getItem('soundcloudAuthToken');
|
|
23667
23670
|
} catch (error1) {}
|
|
@@ -23685,7 +23688,6 @@ SoundCloudService = (function(superClass) {
|
|
|
23685
23688
|
SoundCloudService.prototype.SCGet = function(path) {
|
|
23686
23689
|
var url;
|
|
23687
23690
|
url = ("" + SC.api_url) + path;
|
|
23688
|
-
console.log("SCGet path:", path, SC.auth_token);
|
|
23689
23691
|
return $.ajax({
|
|
23690
23692
|
url: url,
|
|
23691
23693
|
type: 'GET',
|
|
@@ -23824,16 +23826,7 @@ SoundCloudService = (function(superClass) {
|
|
|
23824
23826
|
};
|
|
23825
23827
|
|
|
23826
23828
|
SoundCloudService.prototype.getURL = function(entry, callback) {
|
|
23827
|
-
return
|
|
23828
|
-
return function(streams) {
|
|
23829
|
-
console.log("fetchTrackStreams result:", streams);
|
|
23830
|
-
return callback(streams);
|
|
23831
|
-
};
|
|
23832
|
-
})(this))["catch"]((function(_this) {
|
|
23833
|
-
return function(error) {
|
|
23834
|
-
return console.log('Fetch Track Streams error: ' + error);
|
|
23835
|
-
};
|
|
23836
|
-
})(this));
|
|
23829
|
+
return callback(SC.tracks_url + "?id=" + entry.id + "&atoken=" + SC.auth_token);
|
|
23837
23830
|
};
|
|
23838
23831
|
|
|
23839
23832
|
return SoundCloudService;
|