linagora / jmap-client-ts

JMAP 1.0 client library in TypeScript
MIT License
36 stars 16 forks source link

docs: update quickstart to include Transport example #70

Closed RyKilleen closed 2 years ago

RyKilleen commented 2 years ago

Right now it's not clear from the readme that passing a transport is required when initializing a client, nor is it clear how to use several of the transports exposed in utils

import { Client } from "jmap-client-ts";
import { FetchTransport } from "jmap-client-ts/lib/utils/fetch-transport";

let client = new Client({
  accessToken:
    "....",
  sessionUrl: "https://api.example.com/jmap/session",
  transport: new FetchTransport(fetch),
});