index.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <!DOCTYPE HTML><html><head><title>Tracking API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/kevinrenskers/raml2html 2.2.0"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script><script type="text/javascript">
  2. $(document).ready(function() {
  3. $('.page-header pre code, .top-resource-description pre code').each(function(i, block) {
  4. hljs.highlightBlock(block);
  5. });
  6. $('[data-toggle]').click(function() {
  7. var selector = $(this).data('target') + ' pre code';
  8. $(selector).each(function(i, block) {
  9. hljs.highlightBlock(block);
  10. });
  11. });
  12. // open modal on hashes like #_action_get
  13. $(window).bind('hashchange', function(e) {
  14. var anchor_id = document.location.hash.substr(1); //strip #
  15. var element = $('#' + anchor_id);
  16. // do we have such element + is it a modal? --> show it
  17. if (element.length && element.hasClass('modal')) {
  18. element.modal('show');
  19. }
  20. });
  21. // execute hashchange on first page load
  22. $(window).trigger('hashchange');
  23. // remove url fragment on modal hide
  24. $('.modal').on('hidden.bs.modal', function() {
  25. try {
  26. if (history && history.replaceState) {
  27. history.replaceState({}, '', '#');
  28. }
  29. } catch(e) {}
  30. });
  31. });
  32. </script><style>
  33. .hljs {
  34. background: transparent;
  35. }
  36. .parent {
  37. color: #999;
  38. }
  39. .list-group-item > .badge {
  40. float: none;
  41. margin-right: 6px;
  42. }
  43. .panel-title > .methods {
  44. float: right;
  45. }
  46. .badge {
  47. border-radius: 0;
  48. text-transform: uppercase;
  49. width: 70px;
  50. font-weight: normal;
  51. color: #f3f3f6;
  52. line-height: normal;
  53. }
  54. .badge_get {
  55. background-color: #63a8e2;
  56. }
  57. .badge_post {
  58. background-color: #6cbd7d;
  59. }
  60. .badge_put {
  61. background-color: #22bac4;
  62. }
  63. .badge_delete {
  64. background-color: #d26460;
  65. }
  66. .badge_patch {
  67. background-color: #ccc444;
  68. }
  69. .list-group, .panel-group {
  70. margin-bottom: 0;
  71. }
  72. .panel-group .panel+.panel-white {
  73. margin-top: 0;
  74. }
  75. .panel-group .panel-white {
  76. border-bottom: 1px solid #F5F5F5;
  77. border-radius: 0;
  78. }
  79. .panel-white:last-child {
  80. border-bottom-color: white;
  81. -webkit-box-shadow: none;
  82. box-shadow: none;
  83. }
  84. .panel-white .panel-heading {
  85. background: white;
  86. }
  87. .tab-pane ul {
  88. padding-left: 2em;
  89. }
  90. .tab-pane h2 {
  91. font-size: 1.2em;
  92. padding-bottom: 4px;
  93. border-bottom: 1px solid #ddd;
  94. }
  95. .tab-pane h3 {
  96. font-size: 1.1em;
  97. }
  98. .tab-content {
  99. border-left: 1px solid #ddd;
  100. border-right: 1px solid #ddd;
  101. border-bottom: 1px solid #ddd;
  102. padding: 10px;
  103. }
  104. #sidebar {
  105. margin-top: 30px;
  106. padding-right: 5px;
  107. overflow: auto;
  108. height: 90%;
  109. }
  110. .top-resource-description {
  111. border-bottom: 1px solid #ddd;
  112. background: #fcfcfc;
  113. padding: 15px 15px 0 15px;
  114. margin: -15px -15px 10px -15px;
  115. }
  116. .resource-description {
  117. border-bottom: 1px solid #fcfcfc;
  118. background: #fcfcfc;
  119. padding: 15px 15px 0 15px;
  120. margin: -15px -15px 10px -15px;
  121. }
  122. .resource-description p:last-child {
  123. margin: 0;
  124. }
  125. .list-group .badge {
  126. float: left;
  127. }
  128. .method_description {
  129. margin-left: 85px;
  130. }
  131. .method_description p:last-child {
  132. margin: 0;
  133. }
  134. .list-group-item {
  135. cursor: pointer;
  136. }
  137. .list-group-item:hover {
  138. background-color: #f5f5f5;
  139. }
  140. </style></head><body data-spy="scroll" data-target="#sidebar"><div class="container"><div class="row"><div class="col-md-9" role="main"><div class="page-header"><h1>Tracking API documentation <small>version v1</small></h1><p>http://dddsample.marcusoncode.se/tracking/v1</p></div><div class="panel panel-default"><div class="panel-heading"><h3 id="cargos" class="panel-title">/cargos</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos__trackingId_"><span class="parent">/cargos</span>/{trackingId}</a> <span class="methods"><a href="#cargos__trackingId__get"><span class="badge badge_get">get</span></a></span></h4></div><div id="panel_cargos__trackingId_" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos__trackingId__get'" class="list-group-item"><span class="badge badge_get">get</span><div class="method_description"><p>A specific cargo</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos__trackingId__get"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get</span> <span class="parent">/cargos</span>/{trackingId}</h4></div><div class="modal-body"><div class="alert alert-info"><p>A specific cargo</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos__trackingId__get_request" data-toggle="tab">Request</a></li><li><a href="#cargos__trackingId__get_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos__trackingId__get_request"><h3>URI Parameters</h3><ul><li><strong>trackingId</strong>: <em>required (string)</em><p>The tracking id of the cargo</p></li></ul></div><div class="tab-pane" id="cargos__trackingId__get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
  141. "cargo": {
  142. "tracking_id": "B075CD13",
  143. "status_text": "Not received",
  144. "origin": "DEHAM",
  145. "destination": "SESTO",
  146. "eta": "2016-03-22T19:24:24.686283448Z",
  147. "next_expected_activity": "Next expected activity is to receive cargo in DEHAM.",
  148. "arrival_deadline": "2016-04-08T22:00:00Z",
  149. "events": null
  150. }
  151. }
  152. </code></pre><h2>HTTP status code <a href="http://httpstatus.es/404" target="_blank">404</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
  153. "error": "unknown cargo"
  154. }
  155. </code></pre></div></div></div></div></div></div></div></div></div></div></div><div class="col-md-3"><div id="sidebar" class="hidden-print affix" role="complementary"><ul class="nav nav-pills nav-stacked"><li><a href="#cargos">/cargos</a></li></ul></div></div></div></div></body></html>