GithubHelp home page GithubHelp logo

isabella232 / docs-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from auth0/docs-cli

0.0 0.0 0.0 2.13 MB

Auth0 Docs API client

License: MIT License

Shell 6.96% JavaScript 71.30% CSS 5.09% HTML 16.66%

docs-cli's Introduction

Auth0 Docs CLI

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

Installation

To install the dependencies, execute:

npm install

Usage (local)

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/

Usage (deploy)

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:

docs-cli-1.js
docs-cli-1.3.js
docs-cli-1.3.7.js
docs-cli-1.min.js
docs-cli-1.3.min.js
docs-cli-1.3.7.min.js

Examples

Basic set up

  var docs = new Auth0Docs();

  docs.get(path).then(function(result) {
    ...
  });

Example 1: Setting a custom cache library

(see https://github.com/jpodwys/cache-service)

  var myAwsomeCache = ...
  var docs = new Auth0Docs({ cache: myAwsomeCache });

  docs.get('connections').then(function(result) {
    ...
  });

Example 2: Setting TTL (for the cache)

  var docs = new Auth0Docs({ ttl: 60 /* Secs */ });

  docs.get('connections/something').then(function(result) {
    ...
  });

Example 3: Setting Base URL

  var docs = new Auth0Docs({ baseURL: 'http://myexample.com/meta' });

  docs.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.

docs-cli's People

Contributors

dafortune avatar mpaktiti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.