mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 12:22:10 +03:00
small update
This commit is contained in:
parent
460c7e723b
commit
0f2c928a2f
@ -53,7 +53,7 @@ $% [%thou p=httr]
|
||||
== ==
|
||||
--
|
||||
!:
|
||||
|%
|
||||
|% :::
|
||||
++ parse-img
|
||||
=> jo
|
||||
%- ot
|
||||
@ -213,6 +213,7 @@ $% [%thou p=httr]
|
||||
::
|
||||
++ poke-json
|
||||
|= [ost=bone you=ship act=json]
|
||||
^- [(list move) _+>.$]
|
||||
=+ do=(need ((ot action/so ~):jo act))
|
||||
?+ do !!
|
||||
%list
|
||||
@ -234,26 +235,32 @@ $% [%thou p=httr]
|
||||
[ost %give %nice ~]
|
||||
~
|
||||
%reboot
|
||||
:_ +>.$
|
||||
=+ id=(need ((ot id/ni ~):jo act))
|
||||
~& id
|
||||
:+ (reboot-droplet ost id)
|
||||
[%ost %give %nice ~]
|
||||
^- (list move)
|
||||
:+ `move`(reboot-droplet ost id)
|
||||
[ost %give %nice ~]
|
||||
~
|
||||
==
|
||||
::
|
||||
|
||||
++ reboot-droplet
|
||||
|= [ost=bone id=@ud]
|
||||
=+ ^= reboot
|
||||
:~ ost /reboot
|
||||
~[%digitalocean %api] /v2/droplets/(scot %ud id)/actions
|
||||
:- %post
|
||||
(jobe type/s/'reboot' ~)
|
||||
(mo ['Content-Type' 'application/json' ~] ['Authorization' (cat 3 'Bearer ' access.toke.vat) ~] ~)
|
||||
==
|
||||
(httpreq reboot)
|
||||
::
|
||||
|= [os=bone id=@ud]
|
||||
%- httpreq :*
|
||||
os
|
||||
/reboot
|
||||
~[%digitalocean %api]
|
||||
=+ path=`path`/v2/droplets/'5073686'/actions
|
||||
~& path
|
||||
path
|
||||
[%post `json`(jobe type/s/'reboot' ~)]
|
||||
(mo ['Content-Type' 'application/json' ~] ['Authorization' (cat 3 'Bearer ' access.toke.vat) ~] ~)
|
||||
*quay
|
||||
==
|
||||
|
||||
++ list-droplets
|
||||
|= os=bone
|
||||
~& 'poked'
|
||||
=+ ^= lis
|
||||
:~ os /list
|
||||
~[%digitalocean %api] /v2/droplets
|
||||
|
Loading…
Reference in New Issue
Block a user