@neondatabase/api-client
Introduction
The @neondatabase/api-client
library is a wrapper for the Neon API. It provides a convenient way to interact with the Neon API using TypeScript.
Installation
To install the library, you can use npm or yarn. Run the following command:
npm install @neondatabase/api-client
or
yarn add @neondatabase/api-client
Getting Started
To get started with the @neondatabase/api-client
library, follow these steps:
-
Get your api key:
-
Go to https://console.neon.tech/app/settings/api-keys
-
Click "Generate new API key"
-
Enter name for your key and press "Create"
-
Preserve your api key somewhere, so you can pass it down to your code
-
Import the library:
import { createApiClient } from '@neondatabase/api-client';
- Create an instance of the API client by calling the
createApiClient
function:
const apiClient = createApiClient({
apiKey: 'your-api-key',
});
- Use the
apiClient
instance to make API calls. For example:
const response = await apiClient.listProjects({});
console.log(response);
API Reference
https://api-docs.neon.tech/
Configuration
Since the client is based on axios
library, createApiClient
additionally accepts axios request options.
License
The @neondatabase/api-client
library is licensed under the MIT License. For more information, see the LICENSE file.