@itznotabug/web-amp
v1.5.2
Published
Refactored Appwrite Web SDK with support for named parameter objects
Downloads
6
Readme
Appwrite Web SDK
This is the same SDK as 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:
npm install @itznotabug/web-amp --save
If you're using a bundler (like Rollup or webpack), you can import the Appwrite module when you need it:
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:
<script src="https://cdn.jsdelivr.net/npm/@itznotabug/[email protected]"></script>
Getting Started
Same as https://github.com/appwrite/sdk-for-web?tab=readme-ov-file#getting-started.
Example Usage
Before -
const teams = new Teams(client);
await teams.createMembership(
'productId',
[Role.label('product')],
undefined,
undefined,
undefined,
undefined,
'Product Team'
);
After -
const teams = new Teams(client);
await teams.createMembership('productId', [Role.label('product')], {
name: 'Product Team',
});