3.1.13 • Published 6 years ago

gbox-apis v3.1.13

Weekly downloads
141
License
******
Repository
-
Last release
6 years ago

Build as support for GaussBox API. Works with Sails.js only.

New API's automatically check-in to all GaussBox API's, retrieve info about all API's and many more.

Install

$ npm install --save gbox-apis

Usage

Package requires database configuration on initialisation.

let dbConfig = {
    host: "********",
    port: "********",
    user: "********",
    password: "********",
    database: "********"
};
const Gbox = require('gbox-apis')(dbConfig);

For checking in, routes array must be sent.

let routes = [
    {
        actionName: "String field, descriptive action name, user friendly. This is seen by user when creating permissions.",
        action: "String field, action name, aka user_create. Multiword actions is divided by underscore.",
        type: "String field. Read dev documentation for action types.",
        visibility: "Array of strings, it is optional. Read dev documentation for visibility types.",
        level: "Array of strings, it is optional. Read dev documentation for level types.",
        controllerActions: "Array of strings, it is optional. Read dev documentation for controllerActions.",
        routeVersion: "String field, route version aka v1",
        routeMethod: "String field, HTTP method",
        route: "String field, starts with slash and folowed by API url."
    },
    ...
];

Calling checkIn method. Controller actions is optional.

Gbox.checkIn(routes);

Getting api data with list of available actions.

// to get Apis data
Gbox.getData();

Dependency

To check-in API, package.json must have this properties:

    "name": "service-api",
    "descriptiveName": "Service API",
    "version": "1.0.0",
    "description": "Short API description.",

URL to API is provided in node environment. If not set, API would be checked in with localhost IP.

    process.env.homepage = "127.0.0.1:2222";

Created by

Saša Mihaljenović, Gauss d.o.o.

3.1.13

6 years ago

3.1.12

6 years ago

3.1.11

6 years ago

3.1.10

6 years ago

3.1.9

6 years ago

3.1.8

6 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago