Skip to content

Commit

Permalink
switch code to a class
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Oct 17, 2023
1 parent 150376a commit 4459804
Show file tree
Hide file tree
Showing 38 changed files with 2,653 additions and 2,498 deletions.
5 changes: 4 additions & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
version = 1

[[analyzers]]
name = "javascript"
name = "javascript"

[analyzers.meta]
environment = ["nodejs","mocha"]
51 changes: 2 additions & 49 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,10 @@
{
"root": true,
"env": {
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"],
"ecmaVersion": 2022,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "unicorn"],
"extends": [
"eslint:recommended",
"standard-with-typescript",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:node/recommended",
"plugin:promise/recommended",
"plugin:unicorn/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "none"
},
"singleline": {
"delimiter": "semi"
}
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/strict-boolean-expressions": "warn",
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"orderImportKind": "asc"
}
}
],
"node/no-missing-import": "off",
"unicorn/filename-case": [
"error",
{
"case": "camelCase"
}
]
}
}
"extends": ["eslint-config-cityssm"]
}
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.nyc_output
coverage
node_modules
sandworm
test

.codeclimate.yml
Expand All @@ -13,5 +12,4 @@ test
.npmignore
.prettierignore
.prettierrc.json
.snyk
tsconfig.json
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Avanti API for Node

[![npm (scoped)](https://img.shields.io/npm/v/@cityssm/avanti-api)](https://www.npmjs.com/package/@cityssm/avanti-api)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e0afb710da074164b3597febe9014a08)](https://app.codacy.com/gh/cityssm/node-avanti-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![DeepSource](https://app.deepsource.com/gh/cityssm/node-avanti-api.svg/?label=active+issues&show_trend=true&token=HZ0BFvBA6JYP4qZAI5MNS6JL)](https://app.deepsource.com/gh/cityssm/node-avanti-api/)
[![Maintainability](https://api.codeclimate.com/v1/badges/fbc4a515303a0cdae005/maintainability)](https://codeclimate.com/github/cityssm/node-avanti-api/maintainability)

A wrapper around the [Avanti API](https://avanti.stoplight.io/docs/avanti-api).
Expand All @@ -26,10 +26,10 @@ for instructions on creating the needed credentials.
Note that each endpoint needs to be properly initialized in Avanti as well.

```javascript
import avanti from '@cityssm/avanti-api'
import { AvantiApi } from '@cityssm/avanti-api'

// Initialize the API
avanti.setConfiguration({
const avanti = new AvantiApi({
base_api_url: 'https://myavanti.ca/avtesting-api',
client_id: '',
client_secret: '',
Expand Down
34 changes: 0 additions & 34 deletions apiCall.d.ts

This file was deleted.

79 changes: 0 additions & 79 deletions apiCall.js

This file was deleted.

Loading

0 comments on commit 4459804

Please sign in to comment.