- Fix
.find()
query selecting wrong children object by @hkjasf687261gh #114
- If Content-Type is missing, default to a UTF-8 string response by @nicjansma #105
- Updated mocha because of vulnerabilities by @phillipj
- Updated plex-api-credentials & lodash of child dependencies because of vulnerabilities by @phillipj
- Allow custom response parser to be provided upon instantiation by @phillipj 76539c
- reject() instead of throw when authenticating by @dabbers #82
- Updated request v2.72.0 -> 2.79.0 by @SpaceK33z #78
- Replace use of Q with native Promise by @phillipj #77
- Fix undefined runtime error when authenticating by @phillipj #76
All methods now return native Promise instances, rather than Q promises as before.
-
Support for managed users by @hyperlink #70
By specifyingoptions.managedUser
when creating a plex-api client, see more in Readme.md.
Requires at least Node.js v4.0.
- Added support for PUT queries with .putQuery() by @IonicaBizau #61
- Added timeout option to control timeout on subsequent requests by @lokenx #60
- xml2js from v0.4.15 to v0.4.16
- request from v2.67.0 to v2.69.0
- Add support for extra headers in all of the query() related methods by @OverloadUT #48
- Add support for
https
parameter to force https even on non-443 port by @OverloadUT #47
- Enabling gzip to fix a bug in some versions of PMS/PHT that silently fail when no Accept-Encoding header is sent by @OverloadUT #51
- Added
options.token
to specify authentication token at PlexAPI client instantiation by @MikeOne - Made responses with status code 2xx considered successfull, not just 200 by @MikeOne
- Fixed XML parsing by @phillipj
- Fixing broken authentication blooper by @phillipj
- Extensible authentication mechanisms by @phillipj
- Extracted HTTP headers generation into plex-api-headers for re-use by @phillipj
- Change xml2json to xml2js by @OverloadUT
Some of URIs on the Plex Server responds with XML instead of JSON. Previous versions of plex-api used xml2json to translate between XML to JSON. We have now replaced xml2json with xml2js which might result in a different JSON format when requesting URIs responding with XML.
Please see the documentation of xml2json and xml2js for more details about their differences.
- Updated the readme to explain each of the X-Plex headers by @OverloadUT
- The X-Plex headers are now sent on every request by @OverloadUT
- Added missing X-Plex headers: deviceName, platformVersion by @OverloadUT
- Updated the default X-Plex headers to be a bit more descriptive by @OverloadUT
- Added
postQuery()
to perform POST requests by @OverloadUT
- PlexHome authentication if needed when calling
.perform()
as with.query()
, by @OverloadUT
- Convert to JSON or XML according to server response header, or resolve with raw server response buffer. This allows for image buffers to be fetched. By @YouriT
- Add ability to define app options by @DMarby
- Bugfix for wrong
.uri
in some cases by @pjeby
- PlexHome support
- Deprecated port argument of PlexAPI constructor in favor of an options object
- Retrieves JSON from the Plex HTTP API instead of XML see breaking changes below!
We're now retrieving JSON from the Plex HTTP API instead of XML, which got translated to JSON by this module. Direct consequences:
- Attributes previously found in
result.attributes
are now available directly inresult
- Child items such as Directory and Server has moved from e.g.
result.directory
toresult._children
client.query("/").then(function (result) {
console.log(result.friendlyName); // was result.attributes.friendlyName
console.log("Directory count:", result._children.length); // was result.directory.length
});
v1.0.0 mostly to be a better semver citizen and some housekeeping.
- Updated dependencies
- Housekeeping with some minor code refactor
- Bugfix for not releasing HTTP agent sockets properly on .perform()
- Converted all methods to return promises, rather than accepting callback as argument
- Converted buster tests to mocha/expect.js
- .find() matches attribute values by regular expression
- Added getters for hostname and port
- Made constructor hostname parameter required
- Bugfix for .find() only working when having Directory items
- Generalized URI resolving as bugfix for other types of items than Directories
- Added URIs for Server items
- important Removed explicit XML to JSON conversion to ensure consistent child item names. The main difference for those using previous module versions, is the need to change their use of result.directories to result.directory.