Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itznotabug/web-amp
Appwrite Web SDK with Method Params.
https://github.com/itznotabug/web-amp
Last synced: about 1 month ago
JSON representation
Appwrite Web SDK with Method Params.
- Host: GitHub
- URL: https://github.com/itznotabug/web-amp
- Owner: ItzNotABug
- License: bsd-3-clause
- Created: 2024-07-18T09:23:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-18T10:23:06.000Z (4 months ago)
- Last Synced: 2024-10-08T15:59:22.595Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 13.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Appwrite Web SDK
This is the same SDK as [appwrite](https://www.npmjs.com/package/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/web-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-web?tab=readme-ov-file#getting-started.
## Example Usage
Before -
```js
const functions = new Functions(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
}
);
```