From 80d462c231387cd987626ac462c736b844a2f9d5 Mon Sep 17 00:00:00 2001 From: aj Date: Thu, 10 Aug 2017 21:15:54 +0000 Subject: [PATCH] add prototype docs --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f725c9..46d5e7e 100644 --- a/README.md +++ b/README.md @@ -329,9 +329,19 @@ promise = oauth3.authenticate(); // opens login window for th promise = oauth3.authorize(permissions); // authenticates (if not authenticated) and opens a window to // authorize a particular scope (contacts, photos, whatever) -promise = oauth3.request({ url, method, data }); // make an (authorized) request to a provider's resource +promise = oauth3.request({ url, method, data }); // make an (authorized) arbitrary request to an audience's resource // (contacts, photos, whatever) +promise = oauth3.api(apiname, opts); // make an (authorized) well-known api call to an audience + // See https://labs.daplie.com/docs/ for API schemas + // Ex: oauth3.api('dns.list', { sld: 'daplie', tld: 'com' }); + +// TODO +api = await oauth3.package(audience, schemaname); // make an (authorized) well-known api call to an audience + // Ex: api = await oauth3.package('domains.daplie.com', 'dns@oauth3.org'); + // api.list({ sld: 'mydomain', tld: 'com' }); + + promise = oauth3.logout(); // opens logout window for the provider oauth3.session(); // returns the current session, if any