Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
plague-api
Advanced tools
Readme
v1.09 - include badges
v1.08 - include tests
v1.07 - new methods - resetPassword and confirmEmail
v1.06 - option to change locality using set function
v1.05 - fix encoding problem
v1.04 - register method
Set Plague Api Options
options: Use this to set your location.
var plague = require('plague-api').set({
latitude: -99.999999999999,
longitude: -99.999999999999,
administrativeArea: 'Quebec',
country: 'Canada',
locality: 'Montreal'
});
Register to get UserId and Token
email: Your user email.
password: Your user password.
name: Your name.
callback: callback function.
plague.register('sample@domain.com', 'mypassword', 'My Name', function(user){
if(user.error){
console.log(user.error);
return;
}
console.log(user);
});
Login to get UserId and Token
email: Your plague user email.
password: Your plague user password.
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
console.log(user);
});
Confirm user e-mail
email: Your plague user email.
code: Your plague confirmation code.
callback: callback function.
plague.confirmEmail('sample@domain.com', '1234', function(res){
console.log(res);
});
Reset user password using e-mail
email: Your plague user email.
code: Your plague confirmation code.
callback: callback function.
plague.resetPassword('sample@domain.com', '1234', function(res){
console.log(res);
});
Return all user posts
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
//List all user posts
plague.getPosts(function(res){
var posts = res.posts;
posts.forEach(function(post) {
console.log(post);
})
});
});
Return Nearby Plagues
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
plague.getInfectionsNearby(function(res){
console.log(res);
});
});
Send a text only post to Plague API
text: Text of the post.
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
plague.postText('Hello Plague', function(res){
console.log(res);
});
});
Send a post with a Media Link
mediaLink: Url of the image should be around 600x600 pixels.
mediaLinkPreview: Url of the image should be around 300x300 pixels.
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
plague.postLink(
'http://domain.com/imageFull.png',
'http://domain.com/imageSmall.png',
'Hello! =)',function(res){
console.log(res);
});
});
Delete a post using postId
postId: This is the id returned from getPosts.
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
plague.deletePost(123456,function(res){
console.log(res);
});
});
Delete all user posts
callback: callback function.
plague.login('sample@domain.com', 'mypassword', function(user){
if(user.error){
console.log(user.error);
return;
}
plague.deleteAllPosts(function(res){
console.log(res);
});
});
FAQs
Plague Social Platform NodeJS API
The npm package plague-api receives a total of 5 weekly downloads. As such, plague-api popularity was classified as not popular.
We found that plague-api 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.