How do I download pastebin code via http api?
#1
Posted 31 August 2012 - 10:40 AM
Edit: Oh and.. Save it. If that's possible.
#2
Posted 31 August 2012 - 10:45 AM
pastebin get <code> <NewFilepath>
Or in a program:
shell.run("pastebin","get","<code>","<NewFilepath>")
#3
Posted 31 August 2012 - 10:56 AM
#4
Posted 31 August 2012 - 10:59 AM
pastebin get Bpqpcv9j AIcopy this from here then use Ctrl+V to enter it into the command interface NOT in a program. after that run AI
[EDIT]
You have to turn on HTTP api open the mods configure file and turn it on.
#5
Posted 31 August 2012 - 11:05 AM
BigSHinyToys, on 31 August 2012 - 10:59 AM, said:
pastebin get Bpqpcv9j AIcopy this from here then use Ctrl+V to enter it into the command interface NOT in a program. after that run AI
'No such program' I'm stupid.. Aren't I? I tried entering it into the Lua Interactive Interface too. No luck. I'm on ComputerCraft 1.3 if that changes anything.
Edit: Alright. Trying what you said in the edit. I'm guessing this doesn't work on servers then?
#6
Posted 31 August 2012 - 11:11 AM
open "mod_ComputerCraft.cfg" with notepad
edit the line that says
enableAPI_http=0
so it is
enableAPI_http=1
then try my code again.
Not in lua or in a program in the console.
#7
Posted 31 August 2012 - 11:12 AM
BigSHinyToys, on 31 August 2012 - 11:11 AM, said:
open "mod_ComputerCraft.cfg" with notepad
edit the line that says
enableAPI_http=0
so it is
enableAPI_http=1
then try my code again.
Not in lua or in a program in the console.
It worked! Thanks /> Does the api work on server's too?
#8
Posted 31 August 2012 - 11:14 AM
#9
Posted 31 August 2012 - 11:57 AM
#10
Posted 01 September 2012 - 12:08 AM
DanCarl97, on 31 August 2012 - 11:57 AM, said:
#11
Posted 13 November 2012 - 03:59 AM
maybe a first test could be to
remove the local
fetch the new one
run a script to attach the new one on a nearby monitor
its a good way to update monitors that display rules or other large texts from your browser instead from inside mc, without even logging in to replace a startup file with another..
anybody made this before? cause from 1-2 search terms I used here didn't find even a tool like that or a feature of one of the os's
#12
Posted 17 November 2012 - 12:12 PM
#13
Posted 17 November 2012 - 02:03 PM
enableAPI_http=true
#14
Posted 28 December 2012 - 07:38 PM
#15
Posted 28 December 2012 - 07:52 PM
resp = http.get("http://pastebin.com/raw.php?i="..CODE) if resp then handler=io.open(FILE,"w") handler:write(resp.readAll()) handler:close() return true -- It worked else return fasle -- It failed end
#16
Posted 10 April 2013 - 10:37 AM
also is there a way to manually download it (using multimc)
#17
Posted 10 April 2013 - 04:01 PM
Arcturus125, on 10 April 2013 - 10:37 AM, said:
also is there a way to manually download it (using multimc)
So you need to access the config file for miencraft. when you are using multy MC the file is stored in a different location right click on an instance and view folder then open the .minecraft then configure then edit the file
open "mod_ComputerCraft.cfg" with notepad
edit the line that says
enableAPI_http=0
so it is
enableAPI_http=1
#18
Posted 10 April 2013 - 04:34 PM
I've disabled the default excavate and tunnel programs on my server.
#19
Posted 11 April 2013 - 01:03 AM
BigSHinyToys, on 10 April 2013 - 04:01 PM, said:
Arcturus125, on 10 April 2013 - 10:37 AM, said:
i did i tried enableAPI http= true and 1 it still didn't work
"pastebin get 6qmBBLpz epicmine"
i types in that above but is replied with "no such program"
#20
Posted 11 April 2013 - 02:57 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users