Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed710dc45a | |||
| 2efa5ec057 | |||
| 6e8a1018b3 | |||
| e16ab5b22f | |||
| f65b3d5e72 | |||
| fc325be4c7 | |||
| 87a424a6b7 | |||
| 331cff0550 | |||
| 714edfa147 | |||
| ab701005ec | |||
| 72d7616c16 | |||
| 0e3ce6a58a | |||
| 51a2acd8c3 | |||
| fb218bcbe1 |
@@ -5,13 +5,13 @@
|
|||||||
## インストール
|
## インストール
|
||||||
```bash
|
```bash
|
||||||
# npm
|
# npm
|
||||||
npm install git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.1
|
npm install git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
|
||||||
|
|
||||||
# yarn
|
# yarn
|
||||||
yarn add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.1
|
yarn add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
pnpm add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.1
|
pnpm add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
|
||||||
```
|
```
|
||||||
> **NOTE**
|
> **NOTE**
|
||||||
> このSDKはnpmリポジトリがありません。Gitリポジトリを使用しています。
|
> このSDKはnpmリポジトリがありません。Gitリポジトリを使用しています。
|
||||||
|
|||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "better-uwuzu-sdk",
|
"name": "better-uwuzu-sdk",
|
||||||
"version": "1.1.1",
|
"version": "1.1.6",
|
||||||
"description": "A better uwuzu SDK.",
|
"description": "A better uwuzu SDK.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/types/index.d.ts",
|
"types": "dist/types/index.d.ts",
|
||||||
@@ -33,19 +33,19 @@
|
|||||||
"types": "./dist/types/*.d.ts"
|
"types": "./dist/types/*.d.ts"
|
||||||
},
|
},
|
||||||
"./*/*": {
|
"./*/*": {
|
||||||
"import": "./dist/types/*/*.js",
|
"import": "./dist/*/*.js",
|
||||||
"types": "./dist/types/*/*.d.ts"
|
"types": "./dist/types/*/*.d.ts"
|
||||||
},
|
},
|
||||||
"./*/*/*": {
|
"./*/*/*": {
|
||||||
"import": "./dist/types/*/*/*.js",
|
"import": "./dist/*/*/*.js",
|
||||||
"types": "./dist/types/*/*/*.d.ts"
|
"types": "./dist/types/*/*/*.d.ts"
|
||||||
},
|
},
|
||||||
"./*/*/*/*": {
|
"./*/*/*/*": {
|
||||||
"import": "./dist/types/*/*/*/*.js",
|
"import": "./dist/*/*/*/*.js",
|
||||||
"types": "./dist/types/*/*/*/*.d.ts"
|
"types": "./dist/types/*/*/*/*.d.ts"
|
||||||
},
|
},
|
||||||
"./*/*/*/*/*": {
|
"./*/*/*/*/*": {
|
||||||
"import": "./dist/types/*/*/*/*/*.js",
|
"import": "./dist/*/*/*/*/*.js",
|
||||||
"types": "./dist/types/*/*/*/*/*.d.ts"
|
"types": "./dist/types/*/*/*/*/*.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,14 +39,18 @@ const Parser: parserType = (data, type, endpoint) => {
|
|||||||
|
|
||||||
if (type === "request") {
|
if (type === "request") {
|
||||||
if (result.media && result.text && endpoint === "ueuse/create") {
|
if (result.media && result.text && endpoint === "ueuse/create") {
|
||||||
|
if (result.media.photo) {
|
||||||
for (let i = 0; i < result.media.photo.length; i++) {
|
for (let i = 0; i < result.media.photo.length; i++) {
|
||||||
result[`photo${i + 1}`] = result.media.photo[i];
|
result[`photo${i + 1}`] = result.media.photo[i];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.media.video) {
|
||||||
for (let i = 0; i < result.media.video.length; i++) {
|
for (let i = 0; i < result.media.video.length; i++) {
|
||||||
result[`video${i + 1}`] = result.media.video[i];
|
result[`video${i + 1}`] = result.media.video[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ import InputError from "../../modules/error/input";
|
|||||||
import { UserDataNotFound } from "../../modules/error/critical";
|
import { UserDataNotFound } from "../../modules/error/critical";
|
||||||
|
|
||||||
export default interface TokenGet {
|
export default interface TokenGet {
|
||||||
"ueuse/get": {
|
"token/get": {
|
||||||
body: {
|
body: {
|
||||||
/** api/authで使用したセッション */
|
/** api/authで使用したセッション */
|
||||||
session: string;
|
session: string;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../../modules/error/input";
|
import InputError from "../../../modules/error/input";
|
||||||
import AuthError from "../../../modules/error/auth";
|
import AuthError from "../../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../../modules/ueuse";
|
import ueuseModule from "../../../modules/ueuse";
|
||||||
import ueuseError from "../../../modules/error/ueuse";
|
import ueuseError from "../../../modules/error/ueuse";
|
||||||
import Page from "../../../modules/page";
|
import Page from "../../../modules/page";
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../modules/error/input";
|
import InputError from "../../modules/error/input";
|
||||||
import AuthError from "../../modules/error/auth";
|
import AuthError from "../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../modules/ueuse";
|
import ueuseModule from "../../modules/ueuse";
|
||||||
import ueuseError from "../../modules/error/ueuse";
|
import ueuseError from "../../modules/error/ueuse";
|
||||||
|
|
||||||
export default interface UeuseGet {
|
export default interface UeuseGet {
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../modules/error/input";
|
import InputError from "../../modules/error/input";
|
||||||
import AuthError from "../../modules/error/auth";
|
import AuthError from "../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../modules/ueuse";
|
import ueuseModule from "../../modules/ueuse";
|
||||||
import ueuseError from "../../modules/error/ueuse";
|
import ueuseError from "../../modules/error/ueuse";
|
||||||
import Page from "../../modules/page";
|
import Page from "../../modules/page";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../modules/error/input";
|
import InputError from "../../modules/error/input";
|
||||||
import AuthError from "../../modules/error/auth";
|
import AuthError from "../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../modules/ueuse";
|
import ueuseModule from "../../modules/ueuse";
|
||||||
import ueuseError from "../../modules/error/ueuse";
|
import ueuseError from "../../modules/error/ueuse";
|
||||||
import Page from "../../modules/page";
|
import Page from "../../modules/page";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../modules/error/input";
|
import InputError from "../../modules/error/input";
|
||||||
import AuthError from "../../modules/error/auth";
|
import AuthError from "../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../modules/ueuse";
|
import ueuseModule from "../../modules/ueuse";
|
||||||
import ueuseError from "../../modules/error/ueuse";
|
import ueuseError from "../../modules/error/ueuse";
|
||||||
import Page from "../../modules/page";
|
import Page from "../../modules/page";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import InputError from "../../modules/error/input";
|
import InputError from "../../modules/error/input";
|
||||||
import AuthError from "../../modules/error/auth";
|
import AuthError from "../../modules/error/auth";
|
||||||
import { ueuseModule } from "../../modules/ueuse";
|
import ueuseModule from "../../modules/ueuse";
|
||||||
import ueuseError from "../../modules/error/ueuse";
|
import ueuseError from "../../modules/error/ueuse";
|
||||||
import Page from "../../modules/page";
|
import Page from "../../modules/page";
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -90,8 +90,12 @@ export default class uwuzu<
|
|||||||
|
|
||||||
bodyParsed = {
|
bodyParsed = {
|
||||||
...bodyParsed,
|
...bodyParsed,
|
||||||
token: this._token,
|
token: this._token ?? "",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (bodyParsed.token === "")
|
||||||
|
delete bodyParsed.token;
|
||||||
|
|
||||||
bodyParsed = JSON.stringify(bodyParsed);
|
bodyParsed = JSON.stringify(bodyParsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user