项目作者: gcarreno

项目描述 :
UK Tidal API
高级语言:
项目地址: git://github.com/gcarreno/lazUKTidalAPI.git
创建时间: 2018-06-28T22:44:30Z
项目社区:https://github.com/gcarreno/lazUKTidalAPI

开源协议:MIT License

下载


UK Tidal API

Tidal information for the United Kindom from the Admiralty of the UK Hydrographic Office.

Developer site: https://admiraltyapi.portal.azure-api.net.

API

See the OpenAPI Definition at the end of this file.

Station

Stations

TidalEvents

Open API definition

  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "UK Tidal API",
  5. "version": "1.0"
  6. },
  7. "host": "admiraltyapi.azure-api.net",
  8. "basePath": "/uktidalapi",
  9. "schemes": [
  10. "https"
  11. ],
  12. "securityDefinitions": {
  13. "apiKeyHeader": {
  14. "type": "apiKey",
  15. "name": "Ocp-Apim-Subscription-Key",
  16. "in": "header"
  17. },
  18. "apiKeyQuery": {
  19. "type": "apiKey",
  20. "name": "subscription-key",
  21. "in": "query"
  22. }
  23. },
  24. "security": [
  25. {
  26. "apiKeyHeader": []
  27. },
  28. {
  29. "apiKeyQuery": []
  30. }
  31. ],
  32. "paths": {
  33. "/api/V1/Stations/{stationId}": {
  34. "get": {
  35. "description": "Get the Tidal Station for the provided Station ID.\r\nReturned format is a standard GeoJSON Feature.\r\nThe tidal station number is used as the GeoJSON feature Id.\r\nThe feature has a Point geometry.\r\nThe following custom properties are returned:\r\n* Id - The Tidal Station Number to be used in other API operations.\r\n* Name - The Tidal Station Name.\r\n* Country - The Country that provided the data for the Tidal Station.\r\n* Continuous Heights Available - A boolean to indicate if continuous heights are available for the Tidal Station.\r\n* Footnote - Footnote text.",
  36. "operationId": "Stations_GetStation",
  37. "summary": "Station",
  38. "parameters": [
  39. {
  40. "name": "stationId",
  41. "in": "path",
  42. "description": "The Tidal Station ID.",
  43. "required": true,
  44. "type": "string"
  45. }
  46. ],
  47. "responses": {
  48. "200": {
  49. "description": "OK",
  50. "schema": {
  51. "$ref": "#/definitions/GeoJSON.Net.Feature.Feature"
  52. }
  53. },
  54. "400": {
  55. "description": "Bad Request"
  56. },
  57. "401": {
  58. "description": "Unauthorised user or incorrect subscription key"
  59. },
  60. "403": {
  61. "description": "Quota Exceeded"
  62. },
  63. "404": {
  64. "description": "Not Found"
  65. },
  66. "429": {
  67. "description": "Too Many Requests"
  68. },
  69. "500": {
  70. "description": "Internal Server Error"
  71. }
  72. },
  73. "produces": [
  74. "application/json",
  75. "text/json"
  76. ]
  77. }
  78. },
  79. "/api/V1/Stations": {
  80. "get": {
  81. "description": "Get a list of Tidal Stations. Optionally by Name, Station Type and Bounding Box.\r\nReturned format is a standard GeoJSON FeatureCollection.\r\nThe tidal station number is used as the GeoJSON feature Id.\r\nEach feature has a Point geometry.\r\nThe following custom properties are returned:\r\n* Id - The Tidal Station Number to be used in other API operations.\r\n* Name - The Tidal Station Name.\r\n* Country - The Country that provided the data for the Tidal Station.\r\n* Continuous Heights Available - A boolean to indicate if continuous heights are available for the Tidal Station.\r\n* Footnote - Footnote text.",
  82. "operationId": "Stations_GetStations",
  83. "summary": "Stations",
  84. "parameters": [
  85. {
  86. "name": "name",
  87. "in": "query",
  88. "description": "The name of the station.",
  89. "type": "string"
  90. }
  91. ],
  92. "responses": {
  93. "200": {
  94. "description": "OK",
  95. "schema": {
  96. "$ref": "#/definitions/GeoJSON.Net.Feature.FeatureCollection"
  97. }
  98. },
  99. "401": {
  100. "description": "Unauthorised user or incorrect subscription key"
  101. },
  102. "403": {
  103. "description": "Quota Exceeded"
  104. },
  105. "429": {
  106. "description": "Too Many Requests"
  107. },
  108. "500": {
  109. "description": "Internal Server Error"
  110. }
  111. },
  112. "produces": [
  113. "application/json",
  114. "text/json",
  115. "application/xml",
  116. "text/xml"
  117. ]
  118. }
  119. },
  120. "/api/V1/Stations/{stationId}/TidalEvents": {
  121. "get": {
  122. "description": "Returns high and low water events for the specified Tidal Station.",
  123. "operationId": "TidalEvents_GetTidalEvents",
  124. "summary": "TidalEvents",
  125. "parameters": [
  126. {
  127. "name": "stationId",
  128. "in": "path",
  129. "description": "The Station ID.",
  130. "required": true,
  131. "type": "string"
  132. },
  133. {
  134. "name": "duration",
  135. "in": "query",
  136. "description": "Format - int32. The number of days for which the tidal events will be returned. If this parameter is omitted, a default value of 7 is used which represents today plus the next six days. Valid range is 1 to 7 inclusive. Any other values will return a bad request",
  137. "type": "integer"
  138. }
  139. ],
  140. "responses": {
  141. "200": {
  142. "description": "OK: A list of Tidal Events is returned in the response body.",
  143. "schema": {
  144. "$ref": "#/definitions/UKHO.TidalPrediction.Api.Models.ITidalEventArray"
  145. }
  146. },
  147. "400": {
  148. "description": "Bad Request: The stationId parameter is malformed or not present, or the duration parameter is outside of accepted range"
  149. },
  150. "401": {
  151. "description": "Unauthorised user or incorrect subscription key"
  152. },
  153. "403": {
  154. "description": "Quota Exceeded"
  155. },
  156. "404": {
  157. "description": "Not Found: The requested Station ID could not be found."
  158. },
  159. "429": {
  160. "description": "Too Many Requests"
  161. },
  162. "500": {
  163. "description": "Internal Server Error"
  164. }
  165. },
  166. "produces": [
  167. "application/json",
  168. "text/json",
  169. "application/xml",
  170. "text/xml"
  171. ]
  172. }
  173. }
  174. },
  175. "definitions": {
  176. "GeoJSON.Net.Feature.Feature": {
  177. "type": "object",
  178. "properties": {
  179. "type": {
  180. "enum": [
  181. "Point",
  182. "MultiPoint",
  183. "LineString",
  184. "MultiLineString",
  185. "Polygon",
  186. "MultiPolygon",
  187. "GeometryCollection",
  188. "Feature",
  189. "FeatureCollection"
  190. ],
  191. "type": "string",
  192. "readOnly": true
  193. },
  194. "id": {
  195. "type": "string",
  196. "readOnly": true
  197. },
  198. "geometry": {
  199. "$ref": "#/definitions/GeoJSON.Net.Geometry.IGeometryObject",
  200. "readOnly": true
  201. },
  202. "properties": {
  203. "type": "object",
  204. "additionalProperties": {
  205. "type": "object"
  206. },
  207. "readOnly": true
  208. },
  209. "bbox": {
  210. "type": "array",
  211. "items": {
  212. "format": "double",
  213. "type": "number"
  214. }
  215. },
  216. "crs": {
  217. "$ref": "#/definitions/GeoJSON.Net.CoordinateReferenceSystem.ICRSObject"
  218. }
  219. }
  220. },
  221. "GeoJSON.Net.Geometry.IGeometryObject": {
  222. "type": "object",
  223. "properties": {
  224. "Type": {
  225. "enum": [
  226. "Point",
  227. "MultiPoint",
  228. "LineString",
  229. "MultiLineString",
  230. "Polygon",
  231. "MultiPolygon",
  232. "GeometryCollection",
  233. "Feature",
  234. "FeatureCollection"
  235. ],
  236. "type": "string",
  237. "readOnly": true
  238. }
  239. }
  240. },
  241. "GeoJSON.Net.CoordinateReferenceSystem.ICRSObject": {
  242. "type": "object",
  243. "properties": {
  244. "Type": {
  245. "enum": [
  246. "unspecified",
  247. "name",
  248. "link"
  249. ],
  250. "type": "string",
  251. "readOnly": true
  252. }
  253. }
  254. },
  255. "GeoJSON.Net.Feature.FeatureCollection": {
  256. "type": "object",
  257. "properties": {
  258. "type": {
  259. "enum": [
  260. "Point",
  261. "MultiPoint",
  262. "LineString",
  263. "MultiLineString",
  264. "Polygon",
  265. "MultiPolygon",
  266. "GeometryCollection",
  267. "Feature",
  268. "FeatureCollection"
  269. ],
  270. "type": "string",
  271. "readOnly": true
  272. },
  273. "features": {
  274. "type": "array",
  275. "items": {
  276. "$ref": "#/definitions/GeoJSON.Net.Feature.Feature"
  277. }
  278. },
  279. "bbox": {
  280. "type": "array",
  281. "items": {
  282. "format": "double",
  283. "type": "number"
  284. }
  285. },
  286. "crs": {
  287. "$ref": "#/definitions/GeoJSON.Net.CoordinateReferenceSystem.ICRSObject"
  288. }
  289. }
  290. },
  291. "UKHO.TidalPrediction.Api.Models.ITidalEvent": {
  292. "description": "A representation of a tide time.",
  293. "required": [
  294. "EventType"
  295. ],
  296. "type": "object",
  297. "properties": {
  298. "EventType": {
  299. "description": "Whether the event is for a high or low tide.",
  300. "enum": [
  301. "HighWater",
  302. "LowWater"
  303. ],
  304. "type": "string",
  305. "readOnly": true
  306. },
  307. "DateTime": {
  308. "format": "date-time",
  309. "description": "The time of the tidal event. This may be missing if it is invalid",
  310. "type": "string",
  311. "readOnly": true
  312. },
  313. "Height": {
  314. "format": "double",
  315. "description": "Tidal height in metres. This may be missing if it is invalid",
  316. "type": "number",
  317. "readOnly": true
  318. },
  319. "IsApproximateTime": {
  320. "description": "If the time is approximate.",
  321. "type": "boolean",
  322. "readOnly": true
  323. },
  324. "IsApproximateHeight": {
  325. "description": "If the height is approximate.",
  326. "type": "boolean",
  327. "readOnly": true
  328. },
  329. "Filtered": {
  330. "description": "When set, this indicates that the tidal events either side of this tidal event have been removed.",
  331. "type": "boolean",
  332. "readOnly": true
  333. }
  334. }
  335. },
  336. "UKHO.TidalPrediction.Api.Models.ITidalEventArray": {
  337. "type": "array",
  338. "items": {
  339. "$ref": "#/definitions/UKHO.TidalPrediction.Api.Models.ITidalEvent"
  340. }
  341. }
  342. },
  343. "tags": []
  344. }