link-store: add scry endpoint for getting unseen urls

This commit is contained in:
Fang 2020-02-10 20:18:42 +01:00
parent b540a6c6a3
commit fcf1255b7d
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -40,8 +40,11 @@
::
:: scry-only paths:
::
:: (set url)
:: /seen//some-path the ones we've seen here
::
:: ?
:: /seen/wood-url/some-path have we seen this here (scry only)
:: /seen/wood-url/some-path have we seen this here
::
/+ *link, default-agent, verb, dbug
::
@ -151,6 +154,9 @@
::
[%x %seen @ ^]
``noun+!>((is-seen t.t.path))
::
[%x %unseen *]
``noun+!>((get-unseen t.t.path))
==
::
++ on-watch
@ -372,6 +378,17 @@
%+ ~(put by *(map ^path submissions)) path
submissions:(~(gut by by-group) path *links)
::
++ get-unseen
|= =path
^- (set url)
=/ =links
(~(gut by by-group) path *links)
%- ~(gas in *(set url))
%+ murn submissions.links
|= submission
?: (~(has in seen.links) url) ~
(some url)
::
++ is-seen
|= =path
^- ?