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("<h3>ERROR: no such command: '%s/%s' for endpoint '%s'</h3>", words[0], words[1], pathInfo); } long lastTime = clock1000(); struct trackHub *hub = errCatchTrackHubOpen(urlInput); if (measureTiming || debug) { long thisTime = clock1000(); if (debug) hPrintf("<em>hub open time: %ld millis</em><br>\n", thisTime - lastTime); } -webIncludeFile("inc/dataApi.html"); - -// struct trackHubGenome *hubGenome = hub->genomeList; -// showExamples(urlInput, hubGenome, ucscDb); +hPrintf("<p>Please refer to <a href='../../goldenPath/help/api.html'>API help</a> documentation for more discussion.</p>\n"); if (debug) showCartDump(); hPrintf("<h2>Explore hub or database assemblies and tracks</h2>\n"); hPrintf("<form action='%s' name='hubApiUrl' id='hubApiUrl' method='GET'>\n\n", urlPrefix); hPrintf("<b>Select public hub: </b>"); #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));