Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
nTunes is an HTTP-based API for interacting with your iTunes installation (currently only for Mac OSX), written with NodeJS.
In other words, it's the foundation for writing web applications based on your iTunes library. You could potentially write a website that:
<audio>
?).If you're lazy, just use the awesome npm of course!
npm install -g nTunes
Otherwise feel free to check out this repo and inspect as you will.
nTunes itself is presented with the familiar function(req, res, next)
signature. This means it can be used in your Node code with the standard
Node HTTP server with a one-liner like this:
require("http").createServer(require("nTunes")()).listen(80);
Or it can be used as a layer in connect:
var connect = require("connect");
connect.createServer(
connect.logger(),
connect.staticProvider(__dirname),
require("nTunes")()
).listen(80);
Combining nTunes with connect is the recommend practice.
If you're only interested in seeing the examples nTunes comes packaged with, then it comes with a convenient executable file to easily start the demonstration HTTP server for you to play with. Once you've installed via npm, simply invoke:
nTunes
This starts nTunes as a stand-alone HTTP server in demonstration mode. While the server is running you can experiment with the nTunes API through simple HTTP requests sent to your computer. Here are some examples:
To get the name
of the current track
with a GET request:
curl localhost:8888/current%20track/name
// Returns "Lateralus"
To set your iTunes' volume to 50% with through a POST request:
curl -d value=50 localhost:8888/sound%20volume
// Returns 50
The API mostly returns JSON encoded values, and is mostly intended to be used
with the XMLHttpRequest
object and JSON.parse
function in the web browser,
or http.Client
in Node.
FAQs
An extendable REST API for interacting with iTunes over HTTP
We found that nTunes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.