@axosoft/glo-sdk
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
declare const api: (token: string) => { | ||
declare const GloSDK: (token: string) => { | ||
getAllBoards: (options?: import("./v1_types").GetAllBoardOptions | undefined) => Promise<[import("./v1_types").Board]>; | ||
@@ -44,2 +44,2 @@ boards: { | ||
}; | ||
export default api; | ||
export = GloSDK; |
@@ -5,8 +5,6 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var v1_1 = __importDefault(require("./v1")); | ||
var api = function (token) { | ||
var GloSDK = function (token) { | ||
return v1_1.default(token); | ||
}; | ||
module.exports = api; | ||
exports.default = api; | ||
module.exports = GloSDK; |
{ | ||
"name": "@axosoft/glo-sdk", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "JavaScript SDK for GitKraken Glo APIs", | ||
@@ -9,2 +9,3 @@ "repository": { | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
@@ -11,0 +12,0 @@ "build": "tsc", |
@@ -29,8 +29,8 @@ # GitKraken Glo JavaScript SDK | ||
// Import options | ||
const gloApi = require('@axosoft/glo-sdk'); | ||
import gloApi from '@axosoft/glo-sdk'; | ||
const GloSDK = require('@axosoft/glo-sdk'); | ||
import GloSDK from '@axosoft/glo-sdk'; | ||
// Usage | ||
gloApi(authToken).boards.getAll() | ||
GloSDK(authToken).boards.getAll() | ||
.then(boards => console.log(boards)) | ||
@@ -40,3 +40,3 @@ .catch(error => console.error(error)); | ||
try { | ||
const boards = await gloApi(authToken).boards.getAll(); | ||
const boards = await GloSDK(authToken).boards.getAll(); | ||
} catch (error) { | ||
@@ -43,0 +43,0 @@ console.log(error); |
import v1 from "./v1"; | ||
const api = (token: string) => { | ||
const GloSDK = (token: string) => { | ||
return v1(token); | ||
}; | ||
module.exports = api | ||
export default api | ||
export = GloSDK; |
@@ -1,2 +0,2 @@ | ||
import gloApi from '../../src/index'; | ||
import GloSDK from '../../src/index'; | ||
import axios, { getMock, postMock, deleteMock } from '../../__mocks__/axios'; | ||
@@ -14,3 +14,3 @@ jest.mock('axios'); | ||
test('Get boards', async () => { | ||
const response = await gloApi('fake token').boards.getAll(); | ||
const response = await GloSDK('fake token').boards.getAll(); | ||
expect(response).toEqual('data') | ||
@@ -29,3 +29,3 @@ | ||
test('Get boards with parameters', async () => { | ||
const response = await gloApi('fake token').boards.getAll({ | ||
const response = await GloSDK('fake token').boards.getAll({ | ||
archived: true, | ||
@@ -51,3 +51,3 @@ page: 2, | ||
test('Get board by id', async () => { | ||
const response = await gloApi('fake token').boards.get('1234'); | ||
const response = await GloSDK('fake token').boards.get('1234'); | ||
@@ -62,3 +62,3 @@ expect(response).toEqual('data'); | ||
test('Get board by id with parameters', async () => { | ||
const response = await gloApi('fake token').boards.get('1234', { fields: ['members', 'labels'] }); | ||
const response = await GloSDK('fake token').boards.get('1234', { fields: ['members', 'labels'] }); | ||
@@ -65,0 +65,0 @@ expect(response).toEqual('data'); |
@@ -1,2 +0,2 @@ | ||
import gloApi from '../../src/index'; | ||
import GloSDK from '../../src/index'; | ||
import axios, { getMock, postMock, deleteMock } from '../../__mocks__/axios'; | ||
@@ -15,3 +15,3 @@ jest.mock('axios'); | ||
test('Get user, no parameters', async () => { | ||
const response = await gloApi('fake token').users.getCurrentUser(); | ||
const response = await GloSDK('fake token').users.getCurrentUser(); | ||
expect(response).toEqual('data') | ||
@@ -24,3 +24,3 @@ | ||
test('Get user, with parameters', async () => { | ||
const response = await gloApi('fake token').users.getCurrentUser({ | ||
const response = await GloSDK('fake token').users.getCurrentUser({ | ||
fields: ["username", "email", "id", "name"] | ||
@@ -27,0 +27,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215145
1602