UNPKG

@microbitsclub/microbits-client

Version:
20 lines (19 loc) 1.13 kB
import { MicrobitsClientConfig } from './microbits-client-config'; import { APIResponse } from './api-result'; export declare class MicrobitsClient { readonly config: MicrobitsClientConfig; private fetch; private _authorizationHeader?; constructor(config: MicrobitsClientConfig); private _getAuthorizationHeader; private _log; private _logParams; private _responseLogger; getPaywallById(id: string): Promise<APIResponse.GetPaywallById>; getPaywallByContentUrl(contentUrl: string): Promise<APIResponse.GetPaywallByContentUrl>; getUserSessionById(id: string): Promise<APIResponse.GetUserSessionById>; isUserSessionAuthorizedForPaywall(userSessionId: string, contentUrl: string, paywallId?: string): Promise<APIResponse.IsUserSessionAuthorizedForPaywall>; activateUserSession(userSessionId: string): Promise<APIResponse.ActivateUserSession>; createPaywallPurchase(paywallId: string, userSessionId: string, contentUrl: string): Promise<APIResponse.CreatePaywallPurchase>; getPaywallPurchase(paywallId: string, userSessionId: string): Promise<APIResponse.GetPaywallPurchase>; }