aboutsummaryrefslogtreecommitdiff
path: root/web/gn-uri.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-08-21 12:21:01 +0200
committerPjotr Prins2023-08-21 12:21:01 +0200
commitd06d732625fdc48677ea32b129da905ebd527c38 (patch)
treec744372e426a2c1ed2042192e8292cb3a0536e31 /web/gn-uri.scm
parentb151e98e3933d7e21f20554cc892f0bef0740cba (diff)
downloadgn-guile-d06d732625fdc48677ea32b129da905ebd527c38.tar.gz
Getting group info
Diffstat (limited to 'web/gn-uri.scm')
-rw-r--r--web/gn-uri.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/gn-uri.scm b/web/gn-uri.scm
index c52066d..c0a440a 100644
--- a/web/gn-uri.scm
+++ b/web/gn-uri.scm
@@ -11,6 +11,9 @@
mk-doc
mk-html
mk-url
+ mk-id
+ mk-gnid
+ mk-predicate
prefix
url-parse-id
normalize-id
@@ -43,6 +46,9 @@
(define (base-url)
"http://localhost:8091")
+(define uri-base-url
+ "http://genenetwork.org")
+
(define (prefix)
"Build the API URL including version"
(base-url))
@@ -51,6 +57,10 @@
"Add the path to the API URL"
(string-append (prefix) "/" postfix ext))
+(define* (mk-uri postfix)
+ "Add the path to the GN URI"
+ (string-append uri-base-url "/" postfix))
+
(define (mk-html path)
"Create a pointer to HTML documentation"
(string-append (base-url) "/" path ".html"))
@@ -73,5 +83,8 @@
(define (mk-id postfix)
(mk-html (string-append "id" "/" postfix)))
+(define (mk-gnid postfix)
+ (mk-uri (string-append "id" "/" postfix)))
+
(define (mk-predicate postfix)
(mk-html (string-append "predicate" "/" postfix)))