Commit from GitHub Actions (Publish APIs & Clients)

This commit is contained in:
domwong
2021-09-20 10:19:39 +00:00
parent 4319f7bf4c
commit 77810789ff
10 changed files with 113 additions and 5 deletions

29
clients/ts/qr/index.ts Executable file
View File

@@ -0,0 +1,29 @@
import * as m3o from "@m3o/m3o-node";
export class QrService {
private client: m3o.Client;
constructor(token: string) {
this.client = new m3o.Client({ token: token });
}
//
generate(request: GenerateRequest): Promise<GenerateResponse> {
return this.client.call(
"qr",
"Generate",
request
) as Promise<GenerateResponse>;
}
}
export interface GenerateRequest {
// the size (height and width) in pixels of the generated QR code. Defaults to 256
size?: number;
// the text to encode as a QR code (URL, phone number, email, etc)
text?: string;
}
export interface GenerateResponse {
// link to the QR code image in PNG format
qr?: string;
}