Skip to content

Commit 87050e2

Browse files
committed
rewrite for auto generation from openapi spec
1 parent 057d59b commit 87050e2

205 files changed

Lines changed: 52489 additions & 24634 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
QB_REALM=
2-
QB_USERTOKEN=
3-
TEST_UTF_16=false
4-
TEST_FILE=false
1+
QB_REALM=www
2+
QB_USERTOKEN=

.npmignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
assets/
22
docs/
33
src/
4-
bower.json
5-
build.js
6-
tsconfig.json
7-
ava.config.js
84
.editorconfig
95
.env
106
.env.example
11-
.eslintrc.js
7+
ava.config.mjs
8+
package-lock.json
9+
tsconfig.json

README.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
quickbase
2-
==============
2+
=========
33

44
[![npm license](https://img.shields.io/npm/l/quickbase.svg)](https://www.npmjs.com/package/quickbase) [![npm version](https://img.shields.io/npm/v/quickbase.svg)](https://www.npmjs.com/package/quickbase) [![npm downloads](https://img.shields.io/npm/dm/quickbase.svg)](https://www.npmjs.com/package/quickbase)
55

6-
A lightweight, promise based Quickbase API.
6+
A lightweight, typed, promise-based Quickbase API, autogenerated from the OpenAPI spec
77

8-
Written in TypeScript, targets Nodejs and the Browser
8+
Written in TypeScript, targets Nodejs and the Browser.
99

10-
This library targets the new RESTful JSON-based API, not the old XML-based API. If you want to use the old XML-based API, then please use [v2.x](https://github.com/tflanagan/node-quickbase/tree/v2.x/) of this library.
10+
A large chunk of this library is generated based on the OpenAPI definition found at [https://developer.quickbase.com/](https://developer.quickbase.com/).
11+
12+
All the types and public methods are generated and kept updated directly from the OpenAPI definition.
13+
14+
You can find this code in `src/code-generation/`.
15+
16+
This library targets the RESTful, JSON-based API, not the XML-based API. If you want to use the XML-based API, then please use [v2.x](https://github.com/tflanagan/node-quickbase/tree/v2.x/) of this library.
1117

1218
```
1319
IE 11 Users, if you are receiving this error:
@@ -27,10 +33,7 @@ Install
2733
-------
2834
```
2935
# Install
30-
$ npm install quickbase
31-
32-
# Also available via Bower
33-
$ bower install quickbase
36+
$ npm install --save quickbase
3437
```
3538

3639
Documentation
@@ -77,7 +80,7 @@ var quickbase = new QuickBase({
7780
});
7881

7982
// Using a Temporary Token
80-
quickbase.getTempToken({
83+
quickbase.getTempTokenDBID({
8184
dbid: 'xxxxxxxxx'
8285
}).then(function(results){
8386
return quickbase.getApp({
@@ -93,9 +96,29 @@ quickbase.getTempToken({
9396
Debugging
9497
---------
9598

96-
Server-side, set the environment variable `DEBUG` to `quickbase:*`
99+
Server-side, set the environment variable `DEBUG` to `quickbase:*`.
100+
101+
In the browser, open the dev console and enter: `window.localStorage.debug = 'quickbase:*'`.
97102

98-
In the browser, open the dev console and enter: `window.localStorage.debug = 'quickbase:*'`
103+
The used debug namespaces: `main`, `request`, `response` and for development: `build` and `generate`.
104+
105+
Development
106+
-----------
107+
108+
```
109+
# Fork and clone the repository
110+
$ yarn install
111+
$ git checkout -b feature/branch
112+
# Download the latest OAS definition and replace in `assets/QuickBase_RESTful_API.json`
113+
$ yarn run generate
114+
# Manually modify as required
115+
$ yarn run build
116+
$ yarn run test
117+
$ yarn run docs
118+
$ git add
119+
$ git commit
120+
$ git push -u origin feature/branch
121+
```
99122

100123
License
101124
-------

0 commit comments

Comments
 (0)