@neondatabase/api-client
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -111,2 +111,3 @@ "use strict"; | ||
OperationAction["DisableMaintenance"] = "disable_maintenance"; | ||
OperationAction["ApplyStorageConfig"] = "apply_storage_config"; | ||
})(OperationAction = exports.OperationAction || (exports.OperationAction = {})); | ||
@@ -113,0 +114,0 @@ /** The status of the operation */ |
{ | ||
"name": "@neondatabase/api-client", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Wrapper for Neon API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,1 +0,61 @@ | ||
# Typescript/Javascript client for Neon API. | ||
# @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: | ||
```bash | ||
npm install @neondatabase/api-client | ||
``` | ||
or | ||
```bash | ||
yarn add @neondatabase/api-client | ||
``` | ||
## Getting Started | ||
To get started with the `@neondatabase/api-client` library, follow these steps: | ||
1. Get your api key: | ||
1. Go to https://console.neon.tech/app/settings/api-keys | ||
1. Click "Generate new API key" | ||
1. Enter name for your key and press "Create" | ||
1. Preserve your api key somewhere, so you can pass it down to your code | ||
2. Import the library: | ||
```typescript | ||
import { createApiClient } from '@neondatabase/api-client'; | ||
``` | ||
3. Create an instance of the API client by calling the `createApiClient` function: | ||
```typescript | ||
const apiClient = createApiClient({ | ||
apiKey: 'your-api-key', | ||
}); | ||
``` | ||
4. Use the `apiClient` instance to make API calls. For example: | ||
```typescript | ||
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](https://axios-http.com/docs/req_config). | ||
## License | ||
The `@neondatabase/api-client` library is licensed under the MIT License. For more information, see the [LICENSE](./LICENSE) file. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
247015
11
5717
1
62