hydrothermal / better-pastebin Goto Github PK
View Code? Open in Web Editor NEWThe Pastebin API wrapper Node deserves
License: MIT License
The Pastebin API wrapper Node deserves
License: MIT License
Welp, the title says all
Edit has been broken since March.
10 months late EDIT still not working
Pastebin PRO lets you select a folder to put your paste in, or create a new one if it doesn't exist.
You can select the folder on the paste creation and edit pages.
I can look into adding support for this feature in better-pastebin, although I'm not sure where to start as it's not listed in the API docs.
Please fix edit() ASAP. I really need it for a project.
edit
seems to be broken. It's returning success, but the specified paste is not actually modified. I've created and read a paste from within the callback which confirmed the dev key and login credentials are valid.
var paste = require('better-pastebin');
paste.setDevKey('***');
paste.login('***', '***', function(success, data) {
if(!success) {
console.log('Login Failed (' + data + ')');
return false;
}
paste.edit('***', 'i am editing this', function(success, data) {
if(!success) {
console.log('Edit Failed (' + data + ')');
} else {
console.log('Edit Succeeded (' + data + ')');
}
});
});
Fix this when you read this, assuming that will be in a couple years...
Thanks!
(otherwise it works good)
If left unspecified, these [options] default to the paste's existing options.
But when I try to edit an existing paste it seems to reset all the options I don't specify:
This is also the case if you pass only the new contents as a string.
Presumably the rest of the options such as expiration are reset as well, although I haven't tested this.
Edit: to clarify, if I supply the paste's original options object to the edit function it keeps all of them except format. I tested this with these options:
{
"anonymous": false,
"expires": "N",
"format": "lua",
"privacy": "1",
"name": "test"
}
Pastebin.com announced that all http urls will not work.
I'm already seeing api calls have stopped working since March. I think it may be due to this:
api = {
urls: {
prelogin: "http://pastebin.com/login",
login: "http://pastebin.com/login.php",
apilogin: "http://pastebin.com/api/api_login.php",
raw: "http://pastebin.com/raw/",
edit: "http://pastebin.com/edit",
post: "http://pastebin.com/api/api_post.php"
}
},
These should all be https
I have one project which uses this awesome module to store data on pastebin & retireve data on pastebin.
And this was the exact module which actually fetched pastebin contents. Other modules, as far as I could search, didn't.
Coming to actual point, some of the dependencies are having security issues which are fixed in newer versions.
I'm still new to Javascript so this stuff felt complicated when I forked this repo & went through the code.
Will there be any update on dependencies?
Also can there be something called "404 page detecion" ?
Because wrong links crashed by project & I cannot prevent users from entering wrong links ๐
Edit 1: my bot didn't parse thing properly hence crashed. But it would still help to get 404 detection
Looks like edit is not supported by pastebin.com api.
Working on a fix for it. PR imminent....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.