Giter VIP home page Giter VIP logo

google-maps's Introduction

Google Maps Platform API

A TypeScript-typed and runtime-validated Google Maps Platform API. The requests and responses are validated using Zod and based on the OpenAPI specification.


โš  Warning: This library is for server-side applications only. Do not use it for client-side applications to prevent your API key from leaking โ€” use one of the client-side libraries instead.


The current list of supported APIs:

Installation

pnpm add @vbudovski/google-maps

Development

Getting started

Install the dependencies:

nvm use
pnpm install

Copy the sample environment variables file env.sample to .env and set the required variables. GOOGLE_MAPS_API_KEY must be set in order to run the tests.

Building the library

pnpm build

Running tests

pnpm test

Updating the APIs

When a new version of the OpenAPI schema is released, it is necessary to re-generate the schemas and expose the exports for use.

  1. Generate the new Zod schemas and fetch functions:

    pnpm generate
  2. Export the new functions from a module in src/api. Be sure to follow existing patterns.

  3. Add a test module in src/test. The name should match that of the API export module.

google-maps's People

Contributors

vbudovski avatar github-actions[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.