Name: docs-cli
Owner: Auth0
Description: Auth0 Docs API client
Created: 2015-09-28 19:57:58.0
Updated: 2016-07-28 13:41:39.0
Pushed: 2016-07-28 13:41:38.0
Homepage: null
Size: 2183
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This library provides a module to fetch Auth0 documentation both client and server side. Catching and fetching features are considered core details of this library
To install the dependencies, execute:
npm install
To build and run the library locally, you can run
npm run dev
, that will let you include the library from http://localhost:9999/docs-cli.js, there is an small demo to test the library in http://localhost:9999/
To use it, you have to include the script which has been built, it is built with major, minor and fix versions to be able to granularly specify versioning. You can include either the complete or minified version.
For example, for version 1.3.7, the following files will be built:
-cli-1.js
-cli-1.3.js
-cli-1.3.7.js
-cli-1.min.js
-cli-1.3.min.js
-cli-1.3.7.min.js
r docs = new Auth0Docs();
cs.get(path).then(function(result) {
...
;
(see https://github.com/jpodwys/cache-service)
r myAwsomeCache = ...
r docs = new Auth0Docs({ cache: myAwsomeCache });
cs.get('connections').then(function(result) {
...
;
r docs = new Auth0Docs({ ttl: 60 /* Secs */ });
cs.get('connections/something').then(function(result) {
...
;
r docs = new Auth0Docs({ baseURL: 'http://myexample.com/meta' });
cs.get('connections/something').then(function(result) {
...
;
This example will do a request to http://myexample.com/meta/connections/something. Remember to set up CORs to be able to make the request.