landscape/desk/app/bark.hoon

47 lines
840 B
Plaintext
Raw Normal View History

2023-04-17 18:18:41 +03:00
/+ default-agent, verb, dbug
::
|%
+$ card card:agent:gall
+$ versioned-state
$% state-0
==
+$ state-0 [%0 mailchimp-api-key=cord]
--
::
=| state-0
=* state -
%- agent:dbug
%+ verb |
^- agent:gall
|_ =bowl:gall
+* this .
def ~(. (default-agent this %.n) bowl)
++ on-init `this
++ on-poke
|= [=mark =vase]
^- (quip card _this)
?+ mark (on-poke:def mark vase)
%set-api-key
`this(mailchimp-api-key !<(cord vase))
==
++ on-watch on-watch:def
++ on-agent on-agent:def
++ on-fail
|= [=term =tang]
(mean ':sub +on-fail' term tang)
++ on-leave
|= =path
`this
++ on-save !>(state)
++ on-load
|= old-state=vase
^- (quip card _this)
=/ old !<(versioned-state old-state)
?- -.old
%0
`this(state old)
==
++ on-arvo on-arvo:def
++ on-peek on-peek:def
--