mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-19 06:41:35 +03:00
47 lines
840 B
Plaintext
47 lines
840 B
Plaintext
/+ 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
|
|
--
|