Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
reexport everything from index
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Mar 26, 2022
1 parent 90bc41d commit 0bb6c10
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 14 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript'),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2019,
},
env: {
browser: true,
es2017: true,
node: true,
},
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',

},
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typed-hypixel-api",
"version": "0.1.10",
"version": "0.1.11",
"main": "build/index.js",
"types": "build/index.d.js",
"repository": "https://github.com/skyblockstats/typed-hypixel-api.git",
Expand All @@ -9,6 +9,12 @@
"files": [
"build"
],
"exports": {
"./responses": {
"require": "./v6.js",
"import": "./v6.mjs"
}
},
"dependencies": {
"typescript": "^4.6.2",
"undici": "^4.16.0"
Expand Down
32 changes: 20 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import { InvalidApiKeyResponse, MalformedUuidResponse, MissingFieldResponse, ThrottleResponse } from './responses/error'
import { SkyBlockCollectionsResponse } from './responses/resources/skyblock/collections'
import { SkyBlockSkillsResponse } from './responses/resources/skyblock/skills'
import { SkyBlockItemsResponse } from './responses/resources/skyblock/items'
import { SkyBlockProfilesResponse } from './responses/skyblock/profiles'
import { ApiKeyInformationResponse } from './responses/api'
import { PlayerDataResponse } from './responses/player'
import { fetch } from 'undici'
import { FriendsResponse } from './responses/friends'
import { RecentGamesResponse } from './responses/recentgames'
import { OnlineStatusResponse } from './responses/status'
import { SkyBlockElectionResponse } from './responses/resources/skyblock/election'
import { SkyBlockProfileResponse } from './responses/skyblock/profile'
export * from './responses'
import {
ApiKeyInformationResponse,
FriendsResponse,
InvalidApiKeyResponse,
MalformedUuidResponse,
MissingFieldResponse,
OnlineStatusResponse,
PlayerDataResponse,
RecentGamesResponse,
SkyBlockCollectionsResponse,
SkyBlockElectionResponse,
SkyBlockItemsResponse,
SkyBlockProfileResponse,
SkyBlockProfilesResponse,
SkyBlockSkillsResponse,
ThrottleResponse
} from './responses'



/** The base url of the Hypixel API with a trailing slash */
const BASE_URL = 'https://api.hypixel.net/'
Expand Down
12 changes: 12 additions & 0 deletions src/responses/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export * from './resources/skyblock/collections'
export * from './resources/skyblock/election'
export * from './resources/skyblock/skills'
export * from './resources/skyblock/items'
export * from './skyblock/profiles'
export * from './skyblock/profile'
export * from './recentgames'
export * from './friends'
export * from './status'
export * from './player'
export * from './error'
export * from './api'
2 changes: 1 addition & 1 deletion src/responses/resources/skyblock/election.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface Candidate {
export interface Candidate {
key: string
name: string
perks: {
Expand Down

0 comments on commit 0bb6c10

Please sign in to comment.