Giter Club home page Giter Club logo

better-pastebin's People

Contributors

dowzhong avatar hydrothermal avatar leonardosnt avatar ralyodio avatar sirdonovan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

better-pastebin's Issues

Support for folders

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.

'edit' functionality not working

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 + ')');
    }
  });
});

Editing a paste resets the existing options

The docs say:

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:

  • it resets the privacy to public
  • it resets the name to "Untitled"
  • it resets the format to "" (tested with the format originally set to "lua")

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"
}

need to change to https for api

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

Will there be Dependencies update?

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

edit does nothing

Looks like edit is not supported by pastebin.com api.

Working on a fix for it. PR imminent....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.