7c72374b20a447962b0d2e302feceb27e371e10b hiram Mon Apr 1 14:28:05 2019 -0700 now using official help page refs #18869 diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c index 18d0cc3..849ede9 100644 --- src/hg/hubApi/hubApi.c +++ src/hg/hubApi/hubApi.c @@ -1122,30 +1122,31 @@ hPrintDisable(); puts("Content-Type:application/json"); puts("\n"); /* similar delay system as in DAS server */ botDelay = hgBotDelayTimeFrac(delayFraction); if (botDelay > 0) { if (botDelay > 2000) { char *hogHost = getenv("REMOTE_ADDR"); sendJsonHogMessage(hogHost); return; } sleep1000(botDelay); } + void (*apiFunction)(char **) = hel->val; (*apiFunction)(words); return; } else commandError = TRUE; } puts("Content-Type:text/html"); puts("\n"); /* similar delay system as in DAS server */ botDelay = hgBotDelayTimeFrac(delayFraction); if (botDelay > 0) { @@ -1225,34 +1226,31 @@ if (commandError) { hPrintf("

ERROR: no such command: '%s/%s' for endpoint '%s'

", words[0], words[1], pathInfo); } long lastTime = clock1000(); struct trackHub *hub = errCatchTrackHubOpen(urlInput); if (measureTiming || debug) { long thisTime = clock1000(); if (debug) hPrintf("hub open time: %ld millis
\n", thisTime - lastTime); } -webIncludeFile("inc/dataApi.html"); - -// struct trackHubGenome *hubGenome = hub->genomeList; -// showExamples(urlInput, hubGenome, ucscDb); +hPrintf("

Please refer to API help documentation for more discussion.

\n"); if (debug) showCartDump(); hPrintf("

Explore hub or database assemblies and tracks

\n"); hPrintf("
\n\n", urlPrefix); hPrintf("Select public hub: "); #define JBUFSIZE 2048 #define SMALLBUF 256 char javascript[JBUFSIZE]; struct slPair *events = NULL; safef(javascript, sizeof(javascript), "this.lastIndex=this.selectedIndex;"); slPairAdd(&events, "focus", cloneString(javascript));