summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/swh.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/swh.scm b/guix/swh.scm
index 83f67423c8..14c65f6806 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -474,10 +474,11 @@ and use of ALGORITHM."
hash)
external-id-target))
-(define (origin-visits origin)
- "Return the list of visits of ORIGIN, a record as returned by
-'lookup-origin'."
- (call (swh-url (origin-visits-url origin))
+(define* (origin-visits origin #:optional (max 10))
+ "Return the list of the up to MAX latest visits of ORIGIN, a record as
+returned by 'lookup-origin'."
+ (call (string-append (swh-url (origin-visits-url origin))
+ "?per_page=" (number->string max))
(lambda (port)
(map json->visit (vector->list (json->scm port))))))