1
0

swagger.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  3. <title>Matrix Client-Server API Documentation</title>
  4. <link href="./files/css" rel="stylesheet" type="text/css">
  5. <link href="./files/reset.css" media="screen" rel="stylesheet" type="text/css">
  6. <link href="./files/screen.css" media="screen" rel="stylesheet" type="text/css">
  7. <link href="./files/reset.css" media="print" rel="stylesheet" type="text/css">
  8. <link href="./files/screen.css" media="print" rel="stylesheet" type="text/css">
  9. <script type="text/javascript" src="./files/shred.bundle.js"></script>
  10. <script src="./files/jquery-1.8.0.min.js" type="text/javascript"></script>
  11. <script src="./files/jquery.slideto.min.js" type="text/javascript"></script>
  12. <script src="./files/jquery.wiggle.min.js" type="text/javascript"></script>
  13. <script src="./files/jquery.ba-bbq.min.js" type="text/javascript"></script>
  14. <script src="./files/handlebars-1.0.0.js" type="text/javascript"></script>
  15. <script src="./files/underscore-min.js" type="text/javascript"></script>
  16. <script src="./files/backbone-min.js" type="text/javascript"></script>
  17. <script src="./files/swagger.js" type="text/javascript"></script>
  18. <script src="./files/swagger-ui.js" type="text/javascript"></script>
  19. <script src="./files/highlight.7.3.pack.js" type="text/javascript"></script>
  20. <!-- enabling this will enable oauth2 implicit scope support -->
  21. <script src="./files/swagger-oauth.js" type="text/javascript"></script>
  22. <script type="text/javascript">
  23. $(function () {
  24. window.swaggerUi = new SwaggerUi({
  25. url: "http://localhost:8000/swagger_matrix/api-docs",
  26. dom_id: "swagger-ui-container",
  27. supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
  28. onComplete: function(swaggerApi, swaggerUi){
  29. log("Loaded SwaggerUI");
  30. if(typeof initOAuth == "function") {
  31. initOAuth({
  32. clientId: "your-client-id",
  33. realm: "your-realms",
  34. appName: "your-app-name"
  35. });
  36. }
  37. $('pre code').each(function(i, e) {
  38. hljs.highlightBlock(e)
  39. });
  40. },
  41. onFailure: function(data) {
  42. log("Unable to Load SwaggerUI");
  43. },
  44. docExpansion: "none"
  45. });
  46. $('#input_apiKey').change(function() {
  47. var key = $('#input_apiKey')[0].value;
  48. log("key: " + key);
  49. if(key && key.trim() != "") {
  50. log("added key " + key);
  51. window.authorizations.add("key", new ApiKeyAuthorization("access_token", key, "query"));
  52. }
  53. })
  54. window.swaggerUi.load();
  55. });
  56. </script>
  57. </head>
  58. <body class="swagger-section">
  59. <div id="header">
  60. <div class="swagger-ui-wrap">
  61. <a id="logo" href="http://swagger.wordnik.com/">swagger</a>
  62. <form id="api_selector">
  63. <div class="input"><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"></div>
  64. <div class="input"><input placeholder="access_token" id="input_apiKey" name="apiKey" type="text"></div>
  65. </form>
  66. </div>
  67. </div>
  68. <div id="message-bar" class="swagger-ui-wrap message-fail">Can't read from server. It may not have the appropriate access-control-origin settings.</div>
  69. <div id="swagger-ui-container" class="swagger-ui-wrap"></div>
  70. </body></html>