Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Chute makes it possible for you to easily organize, store and serve photos and videos. This NPM package provides you with a wrapper for the Chute API. You can learn more about Chute http://getchute.com and explore the API at http://picture.io.
npm install chute
Initialize:
var Chute = require('chute');
var client = new Chute;
client.set({
token: 'access token',
id: 'app id'
});
Chutes allow you to manage sets of photos - you can think of them like albums.
Find:
// all chutes found
client.chutes.all(function(err, chutes){
for(var i = 0; i < chutes.length; i++) {
chute.id;
}
});
// chute with ID=12345 found
client.chutes.find({ id: 12345 }, function(err, chute){
chute.id;
});
// chute with ID=12345 found with contributors list inside
client.chutes.find({ id: 12345, contributors: true }, function(err, chute){
chute.contributors;
});
// chute with ID=12345 found with members list inside
client.chutes.find({ id: 12345, members: true }, function(err, chute){
chute.members;
});
// chute with ID=12345 found with parcels list inside
client.chutes.find({ id: 12345, parcels: true }, function(err, chute){
chute.parcels;
});
// chute with ID=12345 found with everything inside
client.chutes.find({
id: 12345,
contributors: true,
members: true,
parcels: true
}, function(err, chute){
chute.id;
});
Create:
// chute created
client.chutes.create({ name: 'Testing' }, function(err, chute){
chute.id;
});
Update:
// chute with ID=235345 changed name to 'New name'
client.chutes.update({ id: 235345, name: 'New name' }, function(err, chute){
chute.id;
});
Remove:
// chute with ID=12345 removed
client.chutes.remove({ id: 12345 }, function(err){
});
Assets represent photos and videos contained within a Chute.
Find:
// asset with ID=12345 found
client.assets.find({ id: 12345 }, function(err, asset){
asset.id;
});
// asset with ID=12345 found with comments inside
client.assets.find({ id: 12345, comments: true }, function(err, asset){
asset.comments;
});
Customize:
client.assets.find({ id: 12345 }, function(err, asset){
asset.url // http://media.getchute.com/media/:id
asset.url.width(640) // http://media.getchute.com/media/:id/w/640
asset.url.height(480) // http://media.getchute.com/media/:id/h/480
asset.url.fill(640, 480) // http://media.getchute.com/media/:id/640x480
asset.url.fit(640, 480) // http://media.getchute.com/media/:id/fit/640x480
});
Like:
client.assets.heart({ id: 12345 }, function(err, asset){
// +1 to asset with ID=12345
});
client.assets.unheart({ id: 12345 }, function(err, asset){
// -1 to asset with ID=12345
});
Remove:
client.assets.remove({ id: 12345 }, function(err){
// asset with ID=12345 removed
});
Bundles allow you to create dynamic sets of photos
Find:
// bundle with ID=12345
client.bundles.find({ id: 12345 }, function(err, bundle){
bundle.id;
});
Create:
client.bundles.create({
ids: [134234, 534125]
}, function(err, bundle){
// bundle with assets 134234 and 534125 created
});
Remove:
client.bundles.remove({ id: 12345 }, function(err){
// bundle with ID=12345 removed
});
Chute provides a simple upload flow that provides image processing and more.
// info about files
var files = [{ filename: 'image.jpg', size: 124235, md5: '0cc175b9c0f1b6a831c399e269772661' }];
// ID of chute which you want upload image to
var chutes = [12423523];
client.uploads.upload({ files: files, chutes: chutes }, function(err, assets){
// assets is an array of asset IDs, which were just uploaded
});
Put your app credentials(access token and id) into test and run it with:
mocha --timeout 10000
© Chute Corporation.
FAQs
API client for Chute platform.
We found that chute demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.