0.0.8 • Published 2 years ago

invited v0.0.8

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Invited API

Basic Invite Handling API and Package

Usage

  1. Go to invited.vercel.app and create an account
  2. Create a new project, and get the apiToken

You have two choices, you can use the api directly or use the client package

API Docs

Client Docs

Install

yarn add invited axios

Basic Usage

const invited = new Invited('apiTokenHere')

await invited.verify('example@example.com')

Create Invite

const invite = await invited.create()
// https://invited.vercel.app/[slug]

// Can modify this URL in the constructor
const invited = new Invited('apiTokenHere', {baseUrl : "YOUR WEBSITE"})

Consume Invite

await invited.consume('example@example.com','slug')

Options

You can set any of the following options in the constructor

export type Options = {
  modal?: boolean
  baseUrl?: string
  darkMode?: boolean
  homeUrl?: string
  redirectUrl?: string
}
OptionDefaultDescription
modaltrueIf a modal should show if the user is not invited
darkModetrueIf the modal should be dark mode or not
baseUrlinvited.vercel.appThe base url to which the slug is added
homeUrl/THe url to return too on the modal
redirectUrlundefinedThe url to redirect too after consume an invite
0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3-a

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago