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

Commit

Permalink
Add variable validation to Activity.ts Query
Browse files Browse the repository at this point in the history
  • Loading branch information
RLAlpha49 committed May 1, 2024
1 parent dcb8818 commit 494b427
Show file tree
Hide file tree
Showing 421 changed files with 2,206 additions and 2,277 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: 'standard-with-typescript',
parserOptions: {
project: './tsconfig.json'
},
rules: {
'@typescript-eslint/consistent-type-definitions': 'off'
},
ignorePatterns: ['**/*.js'],
overrides: [
{
extends: ['plugin:@typescript-eslint/disable-type-checked'],
files: ['./**/*.ts']
},
],
}
3 changes: 1 addition & 2 deletions __tests__/anilist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {MediaTrendResponse} from "../src/apis/anilist/interfaces/responses/query
import {MediaResponse} from "../src/apis/anilist/interfaces/responses/query/Media"
import {AniChartUserResponse} from "../src/apis/anilist/interfaces/responses/query/AniChartUser"
import {SiteStatisticsResponse} from "../src/apis/anilist/interfaces/responses/query/SiteStatistics";
import {MediaListStatus} from "../src/apis/anilist/interfaces/MediaListEntry";

async function handleRateLimit(apiCall: () => Promise<any>, retryAfter = 60) {
try {
Expand Down Expand Up @@ -178,7 +177,7 @@ describe('Anilist API query', () => {
})

test('Activity query', async (): Promise<Activity> => {
const response = await handleRateLimit(() => aniLink.anilist.query.activity({id: 723235883, asHtml: true}))
const response = await handleRateLimit(() => aniLink.anilist.query.activity({id: 723235883, asHtml: true, type_not: 'TEXT', sort: ['ID_DESC', 'PINNED']}))
expect(response).toBeDefined()
return response.data.Activity
})
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions docs/classes/AniLink.AniLink.html

Large diffs are not rendered by default.

Loading

0 comments on commit 494b427

Please sign in to comment.