This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Hydrotronics's profile picture

edit pastebin post

Started by Hydrotronics, 18 July 2016 - 04:09 PM
Hydrotronics #1
Posted 18 July 2016 - 06:09 PM
So, I wanted to make a program for editing a pastebin post (Given you had the right credentials) and I don't know how to edit a pastebin program. I looked at the pastebin api on their website but they didn't mention anything about it :P/>
Is there any way of doing it? Or will I have to focus on another website? If so, which one? And how do I edit it there?

Thanks in advance
KingofGamesYami #2
Posted 18 July 2016 - 06:23 PM
You can't edit a pastebin post. There is nothing in place to allow it. Github, does allow editing, but working with their API isn't exactly fun.

Is there any particular reason you want to edit a pastebin? I usually do it manually, since I write my code in sublime text anyway.
Cloud Ninja #3
Posted 18 July 2016 - 08:55 PM
You are able to edit them in the website, but not in the API or via direct HTTP. In the post if its on your account you can hit edit in the top right of the paste window.
Hydrotronics #4
Posted 21 July 2016 - 05:28 PM
You can't edit a pastebin post. There is nothing in place to allow it. Github, does allow editing, but working with their API isn't exactly fun.

Is there any particular reason you want to edit a pastebin? I usually do it manually, since I write my code in sublime text anyway.

I would like to edit it because I wanted to make a cross-server communications program, as well as ingame code editing.
About the Github API, could you give me an example of scripted editing?
KingofGamesYami #5
Posted 21 July 2016 - 05:34 PM
There's better ways to do cross-server communications. Like an actual server.

As for the Github API, I don't know that much about it. I stay away from HTTP as much as possible, only using it for downloading stuff.
Emma #6
Posted 22 July 2016 - 01:11 AM
Ehh, editing with github is very difficult with the http api as you have to write git objects and push those to github. The github web editor takes care of this for you, but there's no way to interface with it AFAIK.
Here's the documentation if you want to take a look: https://developer.github.com/v3/git/commits/
Edited on 21 July 2016 - 11:12 PM
Hydrotronics #7
Posted 22 July 2016 - 09:57 AM
huh, well, I guess my question has been answered. Thank you! I'll take your info and attempt to make the first cross-server CC comunication program :D/>