Skip to content

Commit

Permalink
rewrite for auto generation from openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tflanagan committed Oct 12, 2022
1 parent 057d59b commit 87050e2
Show file tree
Hide file tree
Showing 205 changed files with 52,489 additions and 24,634 deletions.
6 changes: 2 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
QB_REALM=
QB_USERTOKEN=
TEST_UTF_16=false
TEST_FILE=false
QB_REALM=www
QB_USERTOKEN=
8 changes: 3 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
assets/
docs/
src/
bower.json
build.js
tsconfig.json
ava.config.js
.editorconfig
.env
.env.example
.eslintrc.js
ava.config.mjs
package-lock.json
tsconfig.json
45 changes: 34 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
quickbase
==============
=========

[![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)

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

Written in TypeScript, targets Nodejs and the Browser
Written in TypeScript, targets Nodejs and the Browser.

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.
A large chunk of this library is generated based on the OpenAPI definition found at [https://developer.quickbase.com/](https://developer.quickbase.com/).

All the types and public methods are generated and kept updated directly from the OpenAPI definition.

You can find this code in `src/code-generation/`.

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.

```
IE 11 Users, if you are receiving this error:
Expand All @@ -27,10 +33,7 @@ Install
-------
```
# Install
$ npm install quickbase
# Also available via Bower
$ bower install quickbase
$ npm install --save quickbase
```

Documentation
Expand Down Expand Up @@ -77,7 +80,7 @@ var quickbase = new QuickBase({
});

// Using a Temporary Token
quickbase.getTempToken({
quickbase.getTempTokenDBID({
dbid: 'xxxxxxxxx'
}).then(function(results){
return quickbase.getApp({
Expand All @@ -93,9 +96,29 @@ quickbase.getTempToken({
Debugging
---------

Server-side, set the environment variable `DEBUG` to `quickbase:*`
Server-side, set the environment variable `DEBUG` to `quickbase:*`.

In the browser, open the dev console and enter: `window.localStorage.debug = 'quickbase:*'`.

In the browser, open the dev console and enter: `window.localStorage.debug = 'quickbase:*'`
The used debug namespaces: `main`, `request`, `response` and for development: `build` and `generate`.

Development
-----------

```
# Fork and clone the repository
$ yarn install
$ git checkout -b feature/branch
# Download the latest OAS definition and replace in `assets/QuickBase_RESTful_API.json`
$ yarn run generate
# Manually modify as required
$ yarn run build
$ yarn run test
$ yarn run docs
$ git add
$ git commit
$ git push -u origin feature/branch
```

License
-------
Expand Down
Loading

0 comments on commit 87050e2

Please sign in to comment.