JavaScript SDK


npm install @tareky/sdkimport { createTareky, staticMapUrl, styleUrl } from '@tareky/sdk'
const tareky = createTareky({ key: 'tareky_pk_…' })
const { data, error } = await tareky.GET('/v1/locations/geocode', { params: { query: { q: 'المنصور', limit: 5 } },})if (error) console.log(error.error.code) // see Errors- The client is generated from the same OpenAPI spec as the reference, so every path, parameter and response is typed.
styleUrl('light', { key })gives a map style URL, andstaticMapUrl({ … })a static image URL.- Works in browsers and in Node 18 and later.