Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #613 from martenson/expose-api-ts-version
expose TS version through API
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
API operations allowing clients to determine Tool Shed instance's | ||
capabilities and configuration settings. | ||
""" | ||
|
||
from galaxy.web import _future_expose_api_anonymous_and_sessionless as expose_api_anonymous_and_sessionless | ||
from galaxy.web.base.controller import BaseAPIController | ||
|
||
import logging | ||
log = logging.getLogger( __name__ ) | ||
|
||
|
||
class ConfigurationController( BaseAPIController ): | ||
|
||
def __init__( self, app ): | ||
super( ConfigurationController, self ).__init__( app ) | ||
|
||
@expose_api_anonymous_and_sessionless | ||
def version( self, trans, **kwds ): | ||
""" | ||
GET /api/version | ||
Return a description of the version_major and version of Galaxy Tool Shed | ||
(e.g. 15.07 and 15.07.dev). | ||
:rtype: dict | ||
:returns: dictionary with versions keyed as 'version_major' and 'version' | ||
""" | ||
return {"version_major": self.app.config.version_major, "version": self.app.config.version } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters