Commit Graph

23 Commits

Author SHA1 Message Date
Stein Magnus Jodal
d15c7d0797 js: Log warning if calling convention is not explicitly set 2014-06-20 11:16:46 +02:00
Stein Magnus Jodal
225f41f999 js: Add by-position-or-by-name calling convention
Fixes #699
2014-06-18 23:27:07 +02:00
Stein Magnus Jodal
149287c06a js: Don't include params if method is called without arguments 2014-06-18 22:22:42 +02:00
Stein Magnus Jodal
858a6977df js: Add callingConvention setting
For now it defaults to the existing behavior "by-position-only" and changing it
has no effect.
2014-06-17 20:57:55 +02:00
Stein Magnus Jodal
9ed17b222a js: Test existing call convention 2014-06-17 20:26:45 +02:00
Stein Magnus Jodal
13205bee5f js: Connect to /mopidy/ws without trailing slash
This is the recommended URL since the switch to Tornado as web server.
2014-06-15 23:43:44 +02:00
Stein Magnus Jodal
ee9d19fc6e js: Fix unhandled promise rejection in test 2014-06-15 23:43:44 +02:00
Stein Magnus Jodal
30471bab74 js: Add ServerError and ConnectionError types 2014-06-15 23:43:43 +02:00
Stein Magnus Jodal
026fdb38a3 js: Reject promises using Error objects
This is recommended to get proper stack traces, according to
https://github.com/cujojs/when/blob/master/docs/api.md#a-note-on-javascript-errors.

The new Error objects has the exact same properties as the objects we used to
reject promises previously, thus this should be fully backwards compatible, but
improve debuggability.
2014-06-15 23:43:39 +02:00
Stein Magnus Jodal
c7e96cf992 js: Update all dependencies 2014-01-04 00:05:31 +01:00
Paul Connolley
a83b71239b Update test so that it correctly requires the mopidy module
As part of issue #609, the require statement in mopidy-test.js should
have been updated as the API to require mopidy has changed from:

    require('mopidy').Mopidy;

to:

    require('mopidy');
2013-12-17 08:57:44 +00:00
Stein Magnus Jodal
bc78a65fff js: Upgrade when.js from 1.8.1 to 2.0.0 2013-03-31 14:09:32 +02:00
Stein Magnus Jodal
74b4fdc7ee js: Make test suite run on Node.js using faye-websocket 2013-03-29 13:51:28 +01:00
Stein Magnus Jodal
a032e45c35 js: Make 'Mopidy()' work without 'new' 2013-01-16 22:55:21 +01:00
Stein Magnus Jodal
b14c89dbf1 js: Make connect() public, and document autoConnect/connect() 2012-12-04 13:23:43 +01:00
Stein Magnus Jodal
8d3fd46808 js: Add close() method to close WebSocket without reconnecting 2012-12-04 09:18:34 +01:00
Stein Magnus Jodal
43316babcd js: Remove trailing whitespace 2012-12-04 09:05:52 +01:00
Stein Magnus Jodal
7f570de239 js: Polyfill console inside our own namespace 2012-12-01 17:18:06 +01:00
Stein Magnus Jodal
3045ac0158 js: Add description and params list to API functions 2012-11-30 02:41:39 +01:00
Stein Magnus Jodal
fc9ab6053a js: Make backoff delay limits settings 2012-11-30 02:18:08 +01:00
Stein Magnus Jodal
12f60f3a52 js: Add fully working core API in JavaScript 2012-11-30 02:05:40 +01:00
Stein Magnus Jodal
defc44b747 js: Add empty source and test files 2012-11-29 00:21:16 +01:00
Stein Magnus Jodal
a539006d8b js: Add Function.prototype.bind polyfill to make PhantomJS 1.6 happy 2012-11-29 00:20:17 +01:00