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

Commit

Permalink
Merge pull request #40 from ferreira-tb:ferreira-tb/issue39
Browse files Browse the repository at this point in the history
feat: add `relations` field to `POST /vn`.
  • Loading branch information
ferreira-tb committed Nov 22, 2023
2 parents 441759f + 91c4a72 commit 0705246
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ console.log(results);

## Documentation

To check out docs, visit [tb.dev.br/vndb-query](https://tb.dev.br/vndb-query/guide/introduction.html).
Read the [documentation](https://tb.dev.br/vndb-query/guide/introduction.html) for more details.

## Playground

You can play with VNDB Query in the [playground](https://jsfiddle.net/ferreiratb/0Lezvkfa/27/).
You can test VNDB Query in the [playground](https://jsfiddle.net/ferreiratb/0Lezvkfa/27/).

## License

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vndb-query",
"version": "1.6.1",
"version": "1.7.0",
"description": "VNDB HTTPS API with custom query builder",
"type": "module",
"private": false,
Expand Down
1 change: 1 addition & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export * from './request';

export type MaybeArray<T> = T | T[];
export type MaybePromise<T> = T | Promise<T>;
export type Nullable<T> = T | null | undefined;

export type VNDBConstructorOptions = Partial<Pick<RequestWithToken, 'token'>>;

Expand Down
9 changes: 9 additions & 0 deletions types/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ export type ResponsePostVisualNovelTag = ResponsePostTag & {
lie?: boolean;
};

export type ResponsePostVisualNovelRelations = ResponsePostVisualNovel & {
/** Relation type. */
relation?: string;
/** Whether this VN relation is official. */
relation_official?: boolean;
};

/** @see https://api.vndb.org/kana#vn-fields */
export type ResponsePostVisualNovel = {
id: string;
Expand Down Expand Up @@ -145,6 +152,8 @@ export type ResponsePostVisualNovel = {
/** Number of votes. */
votecount?: number;
screenshots?: ResponsePostVisualNovelScreenshot[];
/** List of VNs directly related to this entry. */
relations?: ResponsePostVisualNovelRelations[];
/** Only directly applied tags are returned, parent tags are not included. */
tags?: ResponsePostVisualNovelTag[];
/**
Expand Down

0 comments on commit 0705246

Please sign in to comment.