https://github.com/jwebcoder/deno_worldtides
Worldtides API wrapper for Deno
https://github.com/jwebcoder/deno_worldtides
api deno worldtides wrapper
Last synced: about 2 months ago
JSON representation
Worldtides API wrapper for Deno
- Host: GitHub
- URL: https://github.com/jwebcoder/deno_worldtides
- Owner: JWebCoder
- License: mit
- Created: 2020-06-24T10:21:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T23:00:02.000Z (almost 6 years ago)
- Last Synced: 2025-03-24T00:09:19.609Z (over 1 year ago)
- Topics: api, deno, worldtides, wrapper
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Deno WorldTides API Wrapper
This is a wrapper for the [WorldTides API](https://worldtides.info) to retrieve tidal data
## Usage
```ts
import { Worldtides } from 'https://deno.land/x/worldtides/mod.ts'
const worldtides = new Worldtides({
key: 'you_api_key'
})
const result = await worldtides.request({
lat: 33.768321,
lon: -118.195617,
stationDistance: 50,
stations: true,
})
console.log(result)
```
## Possible request properties
| key | value type |
|--|--|
| key | string |
| heights | boolean |
| extremes | boolean |
| date | Date |
| days | 1,2,3,4,5,6,7
| datum | datumValues |
| datums | boolean |
| lat | number |
| lon | number |
| plot | plot, boolean
| stationDistance | number |
| stations | boolean |
| start | number |
| length | number |
| step | number |
## Custom types
**plot**
| key | value type |
|--|--|
| width | number |
| height | number |
| fontSize | number |
| grid | 'none', 'course', 'fine' |
| color | string |
| background | string |
**datumValues**
- LAT
- MLLWS
- MLWS
- MHLWS
- MLLW
- MLW
- MHLW
- MLLWN
- MLWN
- MHLWN
- MTL
- MSL
- MLHWN
- MHWN
- MHHWN
- MLHW
- MHW
- MHHW
- MLHWS
- MHWS
- MHHWS
- HAT