Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itznotabug/node-amp
Appwrite Node SDK with Method Params.
https://github.com/itznotabug/node-amp
Last synced: about 1 month ago
JSON representation
Appwrite Node SDK with Method Params.
- Host: GitHub
- URL: https://github.com/itznotabug/node-amp
- Owner: ItzNotABug
- License: bsd-3-clause
- Created: 2024-07-18T11:01:47.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-18T18:08:25.000Z (4 months ago)
- Last Synced: 2024-10-08T16:02:01.639Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 600 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Appwrite Node.js SDK
This is the same SDK as [node-appwrite](https://www.npmjs.com/package/node-appwrite) with added support for `params` in
methods.
No more passing `undefined` now!**This SDK is only compatible with a minimum of Appwrite server version 1.5.x.**
## Installation
### NPM
To install via [NPM](https://www.npmjs.com/):
```bash
npm install @itznotabug/node-amp --save
```If you're using a bundler (like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/)), you can import
the Appwrite module when you need it:```js
import {Client, Account} from "web-amp";
```### CDN
To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before
you use any Appwrite services:```html
```
## Getting Started
Same as https://github.com/appwrite/sdk-for-node?tab=readme-ov-file#getting-started.
## Example Usage
Before -
```js
const functions = new Messaging(client);
await functions.createExecution(
'functionId',
undefined,
false,
'/',
ExecutionMethod.GET,
{key: 'value'}
);
```After -
```js
const functions = new Functions(client);
await functions.createExecution(
'functionId',
{
headers: {key: 'value'},
method: ExecutionMethod.GET
}
);
```