Skip to content

Commit 9632966

Browse files
committed
patch: remove unnecessary api interface
1 parent 579b3be commit 9632966

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

src/amplitude-client.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,21 +2114,4 @@ AmplitudeClient.prototype.setServerUrl = function setServerUrl(serverUrl) {
21142114
}
21152115
};
21162116

2117-
/**
2118-
* Upload all unsent events.
2119-
* @public
2120-
* @example amplitudeClient.uploadEvents();
2121-
*/
2122-
AmplitudeClient.prototype.uploadEvents = function uploadEvents() {
2123-
if (this._shouldDeferCall()) {
2124-
return this._q.push(['uploadEvents'].concat(Array.prototype.slice.call(arguments, 0)));
2125-
}
2126-
2127-
try {
2128-
this.sendEvents();
2129-
} catch (e) {
2130-
utils.log.error(e);
2131-
}
2132-
};
2133-
21342117
export default AmplitudeClient;

test/amplitude-client.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4379,22 +4379,6 @@ describe('AmplitudeClient', function () {
43794379
});
43804380
});
43814381

4382-
describe('uploadEvents', function () {
4383-
beforeEach(function () {
4384-
reset();
4385-
});
4386-
4387-
it('should flush the events', function () {
4388-
amplitude.init(apiKey, null, { batchEvents: true, eventUploadThreshold: 30 });
4389-
amplitude.logEvent('Event Type');
4390-
assert.equal(amplitude._unsentEvents.length, 1);
4391-
amplitude.uploadEvents();
4392-
server.respondWith('success');
4393-
server.respond();
4394-
assert.equal(amplitude._unsentEvents.length, 0);
4395-
});
4396-
});
4397-
43984382
describe('setUserId', function () {
43994383
let clock, startTime;
44004384
beforeEach(function () {

0 commit comments

Comments
 (0)