Jump to content




Pastebin question


  • You cannot reply to this topic
7 replies to this topic

#1 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 24 June 2014 - 06:05 PM

Hi!
I need some help with http api:
How to post something to pastebin using http API, not shell.run('pastebin put...
Also, main thing is that, if I need to know the pastebin code of uploaded file.

Thanks!

#2 flaghacker

  • Members
  • 655 posts

Posted 24 June 2014 - 07:56 PM

Try looking at the code of the "pastebin" program.
edit rom/programs/pastebin


#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 24 June 2014 - 08:06 PM

I'd also look at the pastebin api. They have a well documented api, and I use it for SmartPaste.

#4 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 24 June 2014 - 11:33 PM

Take a look at this, I created it looking through the pastebin program
http://pastebin.com/hbHHH9UX

#5 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 25 June 2014 - 10:35 AM

Thanks for help!
Also can I edit a paste from CC?

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 June 2014 - 10:38 AM

View PostCranium, on 24 June 2014 - 08:06 PM, said:

They have a well documented api, and I use it for SmartPaste.
well yes and no. last I checked they didn't give a definitive list of errors/problems that can be returned as content. it's very annoying!

#7 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 June 2014 - 02:39 PM

View Posttheoriginalbit, on 25 June 2014 - 10:38 AM, said:

well yes and no. last I checked they didn't give a definitive list of errors/problems that can be returned as content. it's very annoying!
Sure it does:

Quote

Bad API request, invalid api_option
Bad API request, invalid api_dev_key
Bad API request, IP blocked
Bad API request, maximum number of 25 unlisted pastes for your free account
Bad API request, maximum number of 10 private pastes for your free account
Bad API request, api_paste_code was empty
Bad API request, maximum paste file size exceeded
Bad API request, invalid api_expire_date
Bad API request, invalid api_paste_private
Bad API request, invalid api_paste_format

Edited by Cranium, 25 June 2014 - 02:40 PM.


#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 June 2014 - 04:16 PM

View PostCranium, on 25 June 2014 - 02:39 PM, said:

-snip-
nah there's more than just those though. there's the captcha errors, and max pastes for IPs, and a few others like that. I've had a few on some servers where the pastebin program will say it has worked, and the contents of the file (or the uploaded as code) is the error message.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users