aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-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)))