@ribpay/oxlin
Advanced tools
Comparing version 0.0.7 to 0.0.8
import axios from 'axios'; | ||
import { interceptorFactory, LockingTokenCache, clientFactory } from '@scienta/axios-oauth2'; | ||
import { OpenAPIClientAxios } from 'openapi-client-axios'; | ||
import { fileURLToPath } from 'url'; | ||
import path, { dirname } from 'path'; | ||
@@ -65,5 +67,8 @@ /*! ***************************************************************************** | ||
static async init(client_id, client_secret) { | ||
// https://stackoverflow.com/a/62892482 | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
// Perform `async` stuff here... | ||
const api = new OpenAPIClientAxios({ | ||
definition: "./swagger-oxlin-payments-api.yaml", | ||
definition: path.join(__dirname, "..", "swagger-oxlin-payments-api.yaml"), | ||
}); // https://github.com/anttiviljami/openapi-client-axios/issues/39#issuecomment-697210630 | ||
@@ -70,0 +75,0 @@ api.init(); |
{ | ||
"name": "@ribpay/oxlin", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": "Guillaume FORTAINE <guillaume+github@fortaine.com>", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/ribpay/oxlin-node", |
207510
76