Redirect apidoc to offsite version (#15657)
* refactor(apidoc): redirect to offsite version * fix(lint): string template, whitespace * fix(router): fix bookmarked visit * fix(lint): various * fix(lint): more obj structure
This commit is contained in:
@@ -8,7 +8,6 @@ website/client/
|
|||||||
website/common/transpiled-babel/
|
website/common/transpiled-babel/
|
||||||
dist/
|
dist/
|
||||||
dist-client/
|
dist-client/
|
||||||
apidoc/html/
|
|
||||||
content_cache/
|
content_cache/
|
||||||
i18n_cache/
|
i18n_cache/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|||||||
@@ -36,29 +36,7 @@ jobs:
|
|||||||
CI: true
|
CI: true
|
||||||
NODE_ENV: test
|
NODE_ENV: test
|
||||||
- run: npm run lint-no-fix
|
- run: npm run lint-no-fix
|
||||||
apidoc:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [21.x]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- run: sudo apt update
|
|
||||||
- run: sudo apt -y install libkrb5-dev
|
|
||||||
- run: cp config.json.example config.json
|
|
||||||
- name: npm install
|
|
||||||
run: |
|
|
||||||
npm i
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
NODE_ENV: test
|
|
||||||
- run: npm run apidoc
|
|
||||||
sanity:
|
sanity:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -106,6 +84,7 @@ jobs:
|
|||||||
CI: true
|
CI: true
|
||||||
NODE_ENV: test
|
NODE_ENV: test
|
||||||
- run: npm run test:common
|
- run: npm run test:common
|
||||||
|
|
||||||
content:
|
content:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Habitica V3 API Documentation",
|
|
||||||
"title": "Habitica",
|
|
||||||
"url": "https://habitica.com",
|
|
||||||
"version": "3.0.0",
|
|
||||||
"sampleUrl": null,
|
|
||||||
"header": {
|
|
||||||
"title": "Introduction",
|
|
||||||
"filename": "apidoc/header.md"
|
|
||||||
},
|
|
||||||
"template": {
|
|
||||||
"withCompare": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Introduction
|
|
||||||
|
|
||||||
This webpage includes the documentation for version 3 of the [Habitica](https://habitica.com) API.
|
|
||||||
|
|
||||||
If you're developing a 3rd party tool that uses the Habitica API, read the [API Usage Guidelines](https://github.com/HabitRPG/habitica/wiki/API-Usage-Guidelines), which describe how to be a responsible user of our server resources!
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import gulp from 'gulp';
|
|
||||||
import clean from 'rimraf';
|
|
||||||
import apidoc from 'apidoc';
|
|
||||||
|
|
||||||
const APIDOC_DEST_PATH = './apidoc/html';
|
|
||||||
const APIDOC_SRC_PATH = './website/server';
|
|
||||||
const APIDOC_CONFIG_PATH = './apidoc/apidoc.json';
|
|
||||||
gulp.task('apidoc:clean', done => {
|
|
||||||
clean(APIDOC_DEST_PATH, done);
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('apidoc', gulp.series('apidoc:clean', done => {
|
|
||||||
const result = apidoc.createDoc({
|
|
||||||
src: APIDOC_SRC_PATH,
|
|
||||||
dest: APIDOC_DEST_PATH,
|
|
||||||
config: APIDOC_CONFIG_PATH,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result === false) {
|
|
||||||
done(new Error('There was a problem generating apiDoc documentation.'));
|
|
||||||
} else {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
gulp.task('apidoc:watch', gulp.series('apidoc', done => gulp.watch(`${APIDOC_SRC_PATH}/**/*.js`, gulp.series('apidoc', done))));
|
|
||||||
@@ -26,7 +26,6 @@ gulp.task('build:cache', gulp.parallel(
|
|||||||
|
|
||||||
gulp.task('build:prod', gulp.series(
|
gulp.task('build:prod', gulp.series(
|
||||||
'build:babel',
|
'build:babel',
|
||||||
'apidoc',
|
|
||||||
'build:cache',
|
'build:cache',
|
||||||
done => done(),
|
done => done(),
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -12,11 +12,9 @@ require('@babel/register');
|
|||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
|
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
|
||||||
require('./gulp/gulp-apidoc'); // eslint-disable-line global-require
|
|
||||||
require('./gulp/gulp-cache'); // eslint-disable-line global-require
|
require('./gulp/gulp-cache'); // eslint-disable-line global-require
|
||||||
require('./gulp/gulp-build'); // eslint-disable-line global-require
|
require('./gulp/gulp-build'); // eslint-disable-line global-require
|
||||||
} else {
|
} else {
|
||||||
require('./gulp/gulp-apidoc'); // eslint-disable-line global-require
|
|
||||||
require('./gulp/gulp-cache'); // eslint-disable-line global-require
|
require('./gulp/gulp-cache'); // eslint-disable-line global-require
|
||||||
require('./gulp/gulp-build'); // eslint-disable-line global-require
|
require('./gulp/gulp-build'); // eslint-disable-line global-require
|
||||||
require('./gulp/gulp-console'); // eslint-disable-line global-require
|
require('./gulp/gulp-console'); // eslint-disable-line global-require
|
||||||
|
|||||||
Generated
+4
-1570
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -13,7 +13,6 @@
|
|||||||
"accepts": "^1.3.8",
|
"accepts": "^1.3.8",
|
||||||
"amazon-payments": "^0.2.9",
|
"amazon-payments": "^0.2.9",
|
||||||
"amplitude": "^6.0.0",
|
"amplitude": "^6.0.0",
|
||||||
"apidoc": "^0.54.0",
|
|
||||||
"apple-auth": "^1.0.9",
|
"apple-auth": "^1.0.9",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
@@ -90,7 +89,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext .js --fix . && cd website/client && npm run lint",
|
"lint": "eslint --ext .js --fix . && cd website/client && npm run lint",
|
||||||
"lint-no-fix": "eslint --ext .js . && cd website/client && npm run lint-no-fix",
|
"lint-no-fix": "eslint --ext .js . && cd website/client && npm run lint-no-fix",
|
||||||
"test": "npm run lint && gulp test && gulp apidoc",
|
"test": "npm run lint && gulp test",
|
||||||
"test:build": "gulp test:prepare:build",
|
"test:build": "gulp test:prepare:build",
|
||||||
"test:api-v3": "gulp test:api-v3",
|
"test:api-v3": "gulp test:api-v3",
|
||||||
"test:api:unit": "gulp test:api:unit",
|
"test:api:unit": "gulp test:api:unit",
|
||||||
@@ -115,7 +114,6 @@
|
|||||||
"docker:mongo:test": "docker compose -f docker-compose.mongo-test-local.yml up",
|
"docker:mongo:test": "docker compose -f docker-compose.mongo-test-local.yml up",
|
||||||
"mongo:test": "node scripts/start-local-mongo.mjs --test-db",
|
"mongo:test": "node scripts/start-local-mongo.mjs --test-db",
|
||||||
"postinstall": "git config --global url.\"https://\".insteadOf git:// && gulp build && cd website/client && npm install",
|
"postinstall": "git config --global url.\"https://\".insteadOf git:// && gulp build && cd website/client && npm install",
|
||||||
"apidoc": "gulp apidoc",
|
|
||||||
"heroku-postbuild": ".heroku/report_deploy.sh"
|
"heroku-postbuild": ".heroku/report_deploy.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="/apidoc"
|
href="https://apidoc.habitica.com"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>{{ $t('APIv3') }}
|
>{{ $t('APIv3') }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { PAGES } from '@/libs/consts';
|
|||||||
import { STATIC_ROUTES } from './static-routes';
|
import { STATIC_ROUTES } from './static-routes';
|
||||||
import { USER_ROUTES } from './user-routes';
|
import { USER_ROUTES } from './user-routes';
|
||||||
import { DEPRECATED_ROUTES } from '@/router/deprecated-routes';
|
import { DEPRECATED_ROUTES } from '@/router/deprecated-routes';
|
||||||
|
import { NotFoundPage } from './shared-route-imports';
|
||||||
|
|
||||||
// NOTE: when adding a page make sure to implement the `common:setTitle` action
|
// NOTE: when adding a page make sure to implement the `common:setTitle` action
|
||||||
|
|
||||||
@@ -259,6 +260,13 @@ const router = new VueRouter({
|
|||||||
// Only used to handle some redirects
|
// Only used to handle some redirects
|
||||||
// See router.beforeEach
|
// See router.beforeEach
|
||||||
{ path: '/static/tavern-and-guilds', redirect: '/static/faq/tavern-and-guilds' },
|
{ path: '/static/tavern-and-guilds', redirect: '/static/faq/tavern-and-guilds' },
|
||||||
|
{
|
||||||
|
path: '/apidoc',
|
||||||
|
component: NotFoundPage,
|
||||||
|
beforeEnter () {
|
||||||
|
window.location.href = 'https://apidoc.habitica.com';
|
||||||
|
},
|
||||||
|
},
|
||||||
{ path: '/redirect/:redirect', name: 'redirect' },
|
{ path: '/redirect/:redirect', name: 'redirect' },
|
||||||
{ path: '*', redirect: { name: 'notFound' } },
|
{ path: '*', redirect: { name: 'notFound' } },
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Erstelle",
|
"generate": "Erstelle",
|
||||||
"getCodes": "Codes erhalten",
|
"getCodes": "Codes erhalten",
|
||||||
"webhooks": "WebHooks",
|
"webhooks": "WebHooks",
|
||||||
"webhooksInfo": "WebHooks bieten Entwicklern die Möglichkeit, Benachrichtigungen zu erhalten, wenn eine bestimmte Aktion durchgeführt wird, z. B. das Bewerten oder Aktualisieren einer Aufgabe oder das Senden einer Nachricht in einer Gruppe. Indem du einen WebHook erstellst, kannst du Änderungen in Habitica wahrnehmen und Anwendungen entwickeln, die auf diese Änderungen reagieren. <br><br> Weitere Informationen und Beispiele findest Du bei den <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Docs</a>.",
|
"webhooksInfo": "WebHooks bieten Entwicklern die Möglichkeit, Benachrichtigungen zu erhalten, wenn eine bestimmte Aktion durchgeführt wird, z. B. das Bewerten oder Aktualisieren einer Aufgabe oder das Senden einer Nachricht in einer Gruppe. Indem du einen WebHook erstellst, kannst du Änderungen in Habitica wahrnehmen und Anwendungen entwickeln, die auf diese Änderungen reagieren. <br><br> Weitere Informationen und Beispiele findest Du bei den <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Docs</a>.",
|
||||||
"enabled": "Aktiviert",
|
"enabled": "Aktiviert",
|
||||||
"webhookURL": "WebHook-URL",
|
"webhookURL": "WebHook-URL",
|
||||||
"invalidUrl": "Ungültige URL",
|
"invalidUrl": "Ungültige URL",
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
"generate": "Generate",
|
"generate": "Generate",
|
||||||
"getCodes": "Get Codes",
|
"getCodes": "Get Codes",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Webhooks provide a way for developers to receive notifications when a particular action is performed, such as scoring or updating a Task, or sending a message in a Group. By creating a webhook, you will be able to listen to changes in Habitica and build apps that respond to these changes.<br><br>For additional information and examples on webhooks, please visit our <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Docs</a>.",
|
"webhooksInfo": "Webhooks provide a way for developers to receive notifications when a particular action is performed, such as scoring or updating a Task, or sending a message in a Group. By creating a webhook, you will be able to listen to changes in Habitica and build apps that respond to these changes.<br><br>For additional information and examples on webhooks, please visit our <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Docs</a>.",
|
||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"webhookURL": "Webhook URL",
|
"webhookURL": "Webhook URL",
|
||||||
"addWebhook": "Add Webhook",
|
"addWebhook": "Add Webhook",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Generate",
|
"generate": "Generate",
|
||||||
"getCodes": "Get Codes",
|
"getCodes": "Get Codes",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Webhooks provide a way for developers to receive notifications when a particular action is performed, such as scoring or updating a Task, or sending a message in a Group. By creating a webhook, you will be able to listen to changes in Habitica and build apps that respond to these changes.<br><br>For additional information and examples on webhooks, please visit our <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Docs</a>.",
|
"webhooksInfo": "Webhooks provide a way for developers to receive notifications when a particular action is performed, such as scoring or updating a Task, or sending a message in a Group. By creating a webhook, you will be able to listen to changes in Habitica and build apps that respond to these changes.<br><br>For additional information and examples on webhooks, please visit our <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Docs</a>.",
|
||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"webhookURL": "Webhook URL",
|
"webhookURL": "Webhook URL",
|
||||||
"invalidUrl": "invalid URL",
|
"invalidUrl": "invalid URL",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Generar",
|
"generate": "Generar",
|
||||||
"getCodes": "Obtener Códigos",
|
"getCodes": "Obtener Códigos",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Los webhooks ayudan a los desarrolladores a recibir una notificación cuando suceden ciertas acciones, como al completar o actualizar una Tarea o al enviar un mensaje a un Grupo. Al crear un webhook podrás estar al día de los cambios en Habitica y crear aplicaciones que respondan a esos cambios. En la wiki podrás encontrar más información y ejemplos de webhooks: consulta la página <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Docs</a>.",
|
"webhooksInfo": "Los webhooks ayudan a los desarrolladores a recibir una notificación cuando suceden ciertas acciones, como al completar o actualizar una Tarea o al enviar un mensaje a un Grupo. Al crear un webhook podrás estar al día de los cambios en Habitica y crear aplicaciones que respondan a esos cambios. En la wiki podrás encontrar más información y ejemplos de webhooks: consulta la página <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Docs</a>.",
|
||||||
"enabled": "Habilitado",
|
"enabled": "Habilitado",
|
||||||
"webhookURL": "URL del Webhook",
|
"webhookURL": "URL del Webhook",
|
||||||
"invalidUrl": "Url no válida",
|
"invalidUrl": "Url no válida",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Générer",
|
"generate": "Générer",
|
||||||
"getCodes": "Obtenir les Codes",
|
"getCodes": "Obtenir les Codes",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Webhooks propose aux Développeu·r·se·s de recevoir des notification quand une action en particulier est faite, tel que valider ou mettre à jour une Tâche, ou envoyé un message dans un Groupe. En créant un webhook, vous pourrez écouter les changements dans Habitica et mettre au point des applis qui répondent à ces changement. <br><br>Pour des informations complémentaires et des exemples de webhooks, merci de visiter nos<a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\"> Documents API</a>.",
|
"webhooksInfo": "Webhooks propose aux Développeu·r·se·s de recevoir des notification quand une action en particulier est faite, tel que valider ou mettre à jour une Tâche, ou envoyé un message dans un Groupe. En créant un webhook, vous pourrez écouter les changements dans Habitica et mettre au point des applis qui répondent à ces changement. <br><br>Pour des informations complémentaires et des exemples de webhooks, merci de visiter nos<a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\"> Documents API</a>.",
|
||||||
"enabled": "Activé",
|
"enabled": "Activé",
|
||||||
"webhookURL": "URL du webhook",
|
"webhookURL": "URL du webhook",
|
||||||
"invalidUrl": "URL invalide",
|
"invalidUrl": "URL invalide",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Generálás",
|
"generate": "Generálás",
|
||||||
"getCodes": "Kódok megszerzése",
|
"getCodes": "Kódok megszerzése",
|
||||||
"webhooks": "Webhook",
|
"webhooks": "Webhook",
|
||||||
"webhooksInfo": "A webhookok lehetőséget adnak a fejlesztőknek arra, hogy értesítést kapjanak, amikor valamilyen művelet történik – például amikor pontozol vagy frissítesz egy feladatot vagy üzenetet küldesz egy csoportban. Ha létrehozol egy webhookot, figyelheted a változásokat a Habiticában, és olyan alkalmazásokat építhetsz, amik ezekre a változásokra reagálnak.<br><br>További információért és példákért látogasd meg az <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API dokumentációnkat</a>.",
|
"webhooksInfo": "A webhookok lehetőséget adnak a fejlesztőknek arra, hogy értesítést kapjanak, amikor valamilyen művelet történik – például amikor pontozol vagy frissítesz egy feladatot vagy üzenetet küldesz egy csoportban. Ha létrehozol egy webhookot, figyelheted a változásokat a Habiticában, és olyan alkalmazásokat építhetsz, amik ezekre a változásokra reagálnak.<br><br>További információért és példákért látogasd meg az <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API dokumentációnkat</a>.",
|
||||||
"enabled": "Engedélyezve",
|
"enabled": "Engedélyezve",
|
||||||
"webhookURL": "Webhook URL",
|
"webhookURL": "Webhook URL",
|
||||||
"invalidUrl": "érvénytelen url",
|
"invalidUrl": "érvénytelen url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Genera",
|
"generate": "Genera",
|
||||||
"getCodes": "Ottieni codici",
|
"getCodes": "Ottieni codici",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Habitica provvede webhook in modo tale che quando alcune azioni avvengono nel tuo account, le informazioni possono essere inviate a uno script su un altro sito. Puoi specificare questi script qui. Fai attenzione con questa funzione perché se specifichi un URL non corretto questo può causare errori e lentezza in Habitica. Per ulterioni informazioni vedi l'articolo in inglese sulla wiki <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">Webhooks</a>.",
|
"webhooksInfo": "Habitica provvede webhook in modo tale che quando alcune azioni avvengono nel tuo account, le informazioni possono essere inviate a uno script su un altro sito. Puoi specificare questi script qui. Fai attenzione con questa funzione perché se specifichi un URL non corretto questo può causare errori e lentezza in Habitica. Per ulterioni informazioni vedi l'articolo in inglese sulla wiki <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">Webhooks</a>.",
|
||||||
"enabled": "Abilitato",
|
"enabled": "Abilitato",
|
||||||
"webhookURL": "URL Webhook",
|
"webhookURL": "URL Webhook",
|
||||||
"invalidUrl": "URL non valido",
|
"invalidUrl": "URL non valido",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "生成する",
|
"generate": "生成する",
|
||||||
"getCodes": "コードを取得する",
|
"getCodes": "コードを取得する",
|
||||||
"webhooks": "Webhook",
|
"webhooks": "Webhook",
|
||||||
"webhooksInfo": "Webhookは、タスクの採点や更新、グループ内のメッセージ送信など、特定のアクションが実行されたときに通知を受け取る方法を開発者に提供します。Webhookを作成することで、Habiticaの変更を監視し、その変更に対応するアプリを構築することができます。<br><br>Webhookに関する追加情報や例については、<a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Docs</a>をご覧ください。",
|
"webhooksInfo": "Webhookは、タスクの採点や更新、グループ内のメッセージ送信など、特定のアクションが実行されたときに通知を受け取る方法を開発者に提供します。Webhookを作成することで、Habiticaの変更を監視し、その変更に対応するアプリを構築することができます。<br><br>Webhookに関する追加情報や例については、<a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Docs</a>をご覧ください。",
|
||||||
"enabled": "有効",
|
"enabled": "有効",
|
||||||
"webhookURL": "webフック URL",
|
"webhookURL": "webフック URL",
|
||||||
"invalidUrl": "無効な Url",
|
"invalidUrl": "無効な Url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Genereren",
|
"generate": "Genereren",
|
||||||
"getCodes": "Codes verkrijgen",
|
"getCodes": "Codes verkrijgen",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Webhooks bieden ontwikkelaars een manier om meldingen te ontvangen wanneer een bepaalde actie wordt uitgevoerd, zoals het beoordelen of bijwerken van een Taak, of het verzenden van een bericht in een Groep. Door een webhook te maken, kunt u luisteren naar wijzigingen in Habitica en apps bouwen die op deze wijzigingen reageren.<br><br>Voor meer informatie en voorbeelden over webhooks kunt u onze <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API-documentatie</a> raadplegen.",
|
"webhooksInfo": "Webhooks bieden ontwikkelaars een manier om meldingen te ontvangen wanneer een bepaalde actie wordt uitgevoerd, zoals het beoordelen of bijwerken van een Taak, of het verzenden van een bericht in een Groep. Door een webhook te maken, kunt u luisteren naar wijzigingen in Habitica en apps bouwen die op deze wijzigingen reageren.<br><br>Voor meer informatie en voorbeelden over webhooks kunt u onze <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API-documentatie</a> raadplegen.",
|
||||||
"enabled": "Ingeschakeld",
|
"enabled": "Ingeschakeld",
|
||||||
"webhookURL": "Webhook-URL",
|
"webhookURL": "Webhook-URL",
|
||||||
"invalidUrl": "ongeldige url",
|
"invalidUrl": "ongeldige url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Generuj",
|
"generate": "Generuj",
|
||||||
"getCodes": "Zdobądź kody",
|
"getCodes": "Zdobądź kody",
|
||||||
"webhooks": "Webhooki",
|
"webhooks": "Webhooki",
|
||||||
"webhooksInfo": "Habitica udostępnia webhooki, które umożliwiają przesyłanie informacji o pewnych działaniach występujących na twoim koncie do skryptów na innej stronie internetowej. Tutaj można wykazać te skrypty. Bądź ostrożny, gdyż wpisanie niepoprawnych URL może spowodować w Habitica błędy lub spowolnienia. Więcej informacji znajdziesz na stronie <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">Webhooki</a>.",
|
"webhooksInfo": "Habitica udostępnia webhooki, które umożliwiają przesyłanie informacji o pewnych działaniach występujących na twoim koncie do skryptów na innej stronie internetowej. Tutaj można wykazać te skrypty. Bądź ostrożny, gdyż wpisanie niepoprawnych URL może spowodować w Habitica błędy lub spowolnienia. Więcej informacji znajdziesz na stronie <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">Webhooki</a>.",
|
||||||
"enabled": "Włączone",
|
"enabled": "Włączone",
|
||||||
"webhookURL": "Link do webhooka",
|
"webhookURL": "Link do webhooka",
|
||||||
"invalidUrl": "Nieprawidłowy url",
|
"invalidUrl": "Nieprawidłowy url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Gerar",
|
"generate": "Gerar",
|
||||||
"getCodes": "Obter Códigos",
|
"getCodes": "Obter Códigos",
|
||||||
"webhooks": "Webhooks",
|
"webhooks": "Webhooks",
|
||||||
"webhooksInfo": "Os webhooks fornecem uma maneira para os desenvolvedores receberem notificações quando uma ação específica é realizada, como marcar ou atualizar uma Tarefa, ou enviar uma mensagem em um Grupo. Ao criar um webhook, você poderá ouvir as mudanças no Habitica e construir aplicativos que respondam a essas mudanças. <br><br>Para informações adicionais e exemplos sobre webhooks, por favor visite nossa <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">Documentação da API</a>.",
|
"webhooksInfo": "Os webhooks fornecem uma maneira para os desenvolvedores receberem notificações quando uma ação específica é realizada, como marcar ou atualizar uma Tarefa, ou enviar uma mensagem em um Grupo. Ao criar um webhook, você poderá ouvir as mudanças no Habitica e construir aplicativos que respondam a essas mudanças. <br><br>Para informações adicionais e exemplos sobre webhooks, por favor visite nossa <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">Documentação da API</a>.",
|
||||||
"enabled": "Habilitado",
|
"enabled": "Habilitado",
|
||||||
"webhookURL": "URL do Webhook",
|
"webhookURL": "URL do Webhook",
|
||||||
"invalidUrl": "url inválida",
|
"invalidUrl": "url inválida",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Сгенерировать",
|
"generate": "Сгенерировать",
|
||||||
"getCodes": "Получить коды",
|
"getCodes": "Получить коды",
|
||||||
"webhooks": "Веб-хуки",
|
"webhooks": "Веб-хуки",
|
||||||
"webhooksInfo": "Веб-хуки — это способ для разработчиков получать уведомления при выполнении определенных действий, таких как выполнение задачи, её обновление или отправка сообщения в группу. Создав веб-хук, вы сможете отслеживать изменения в Habitica и создавать приложения, которые на них реагируют. <br><br>Для дополнительной информации и примеров использования веб-хуков посетите нашу <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">Документацию по API</a>.",
|
"webhooksInfo": "Веб-хуки — это способ для разработчиков получать уведомления при выполнении определенных действий, таких как выполнение задачи, её обновление или отправка сообщения в группу. Создав веб-хук, вы сможете отслеживать изменения в Habitica и создавать приложения, которые на них реагируют. <br><br>Для дополнительной информации и примеров использования веб-хуков посетите нашу <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">Документацию по API</a>.",
|
||||||
"enabled": "Включено",
|
"enabled": "Включено",
|
||||||
"webhookURL": "Ссылка на веб-хук",
|
"webhookURL": "Ссылка на веб-хук",
|
||||||
"invalidUrl": "неверный url",
|
"invalidUrl": "неверный url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Üret",
|
"generate": "Üret",
|
||||||
"getCodes": "Kod Al",
|
"getCodes": "Kod Al",
|
||||||
"webhooks": "Webhook'lar",
|
"webhooks": "Webhook'lar",
|
||||||
"webhooksInfo": "Webhooklar, geliştiricilerin belirli bir işlem gerçekleştiğinde — örneğin bir Görevin puanlanması veya güncellenmesi ya da bir Grupta mesaj gönderilmesi gibi — bildirim almasını sağlayan bir yöntem sunar. Bir webhook oluşturarak Habitica’daki değişiklikleri dinleyebilir ve bu değişikliklere tepki veren uygulamalar geliştirebilirsin.<br><br>Webhooks hakkında ek bilgi ve örnekler için lütfen <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API Dokümanlarımızı</a> ziyaret et.",
|
"webhooksInfo": "Webhooklar, geliştiricilerin belirli bir işlem gerçekleştiğinde — örneğin bir Görevin puanlanması veya güncellenmesi ya da bir Grupta mesaj gönderilmesi gibi — bildirim almasını sağlayan bir yöntem sunar. Bir webhook oluşturarak Habitica’daki değişiklikleri dinleyebilir ve bu değişikliklere tepki veren uygulamalar geliştirebilirsin.<br><br>Webhooks hakkında ek bilgi ve örnekler için lütfen <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API Dokümanlarımızı</a> ziyaret et.",
|
||||||
"enabled": "Aktif",
|
"enabled": "Aktif",
|
||||||
"webhookURL": "Webhook URL'si",
|
"webhookURL": "Webhook URL'si",
|
||||||
"invalidUrl": "geçersiz url",
|
"invalidUrl": "geçersiz url",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "Згенерувати",
|
"generate": "Згенерувати",
|
||||||
"getCodes": "Отримати коди",
|
"getCodes": "Отримати коди",
|
||||||
"webhooks": "Веб-хуки",
|
"webhooks": "Веб-хуки",
|
||||||
"webhooksInfo": "Веб-гуки надають розробникам можливість отримувати сповіщення, коли виконується певна дія, наприклад, виконання або оновлення Задачі, або надсилання повідомлення в Групі. Створивши веб-гук, ви зможете відслідковувати зміни в Habitica та створювати додатки, які реагуватимуть на ці зміни.<br><br>Щоб отримати додаткову інформацію та приклади веб-гуків, відвідайте нашу <a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API документацію</a>.",
|
"webhooksInfo": "Веб-гуки надають розробникам можливість отримувати сповіщення, коли виконується певна дія, наприклад, виконання або оновлення Задачі, або надсилання повідомлення в Групі. Створивши веб-гук, ви зможете відслідковувати зміни в Habitica та створювати додатки, які реагуватимуть на ці зміни.<br><br>Щоб отримати додаткову інформацію та приклади веб-гуків, відвідайте нашу <a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API документацію</a>.",
|
||||||
"enabled": "Увімкнено",
|
"enabled": "Увімкнено",
|
||||||
"webhookURL": "Посилання на веб-хук",
|
"webhookURL": "Посилання на веб-хук",
|
||||||
"invalidUrl": "неправильне посилання",
|
"invalidUrl": "неправильне посилання",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
"generate": "生成",
|
"generate": "生成",
|
||||||
"getCodes": "获取代码",
|
"getCodes": "获取代码",
|
||||||
"webhooks": "Webhook",
|
"webhooks": "Webhook",
|
||||||
"webhooksInfo": "Webhook为开发人员提供了一种在执行特定操作时接收通知的方式,例如评分或更新任务,或在群组中发送消息。通过创建webhook,你将能够监听Habitica的变化,并构建响应这些变化的应用程序。<br><br>有关webhook的更多信息和示例,请访问我们的<a target=\"_blank\" href=\"https://habitica.com/apidoc/#api-Webhook-AddWebhook\">API 文档</a>。",
|
"webhooksInfo": "Webhook为开发人员提供了一种在执行特定操作时接收通知的方式,例如评分或更新任务,或在群组中发送消息。通过创建webhook,你将能够监听Habitica的变化,并构建响应这些变化的应用程序。<br><br>有关webhook的更多信息和示例,请访问我们的<a target=\"_blank\" href=\"https://apidoc.habitica.com/#api-Webhook-AddWebhook\">API 文档</a>。",
|
||||||
"enabled": "已启用",
|
"enabled": "已启用",
|
||||||
"webhookURL": "Webhook链接",
|
"webhookURL": "Webhook链接",
|
||||||
"invalidUrl": "无效的url",
|
"invalidUrl": "无效的url",
|
||||||
|
|||||||
@@ -32,7 +32,4 @@ export default function staticMiddleware (expressApp) {
|
|||||||
|
|
||||||
/* The remaining files are not cached yet. */
|
/* The remaining files are not cached yet. */
|
||||||
expressApp.use('/static', express.static(`${BASE_DIR}/website/client/dist/static`));
|
expressApp.use('/static', express.static(`${BASE_DIR}/website/client/dist/static`));
|
||||||
|
|
||||||
/* APIdoc files, not cached yet. */
|
|
||||||
expressApp.use('/apidoc', express.static(`${BASE_DIR}/apidoc/html`));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,14 @@
|
|||||||
// DEPRECATED AND INACTIVE
|
// DEPRECATED AND INACTIVE
|
||||||
|
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import nconf from 'nconf';
|
|
||||||
import {
|
import {
|
||||||
NotFound,
|
NotFound,
|
||||||
} from '../libs/errors';
|
} from '../libs/errors';
|
||||||
|
|
||||||
const router = express.Router(); // eslint-disable-line new-cap
|
const router = express.Router(); // eslint-disable-line new-cap
|
||||||
|
|
||||||
const BASE_URL = nconf.get('BASE_URL');
|
|
||||||
|
|
||||||
router.all('*', (req, res, next) => {
|
router.all('*', (req, res, next) => {
|
||||||
const error = new NotFound(`API v1 is no longer supported, please use API v3 instead (${BASE_URL}/apidoc).`);
|
const error = new NotFound('API v1 is no longer supported, please use API v3 instead (https://apidoc.habitica.com).');
|
||||||
return next(error);
|
return next(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,14 @@
|
|||||||
// DEPRECATED AND INACTIVE
|
// DEPRECATED AND INACTIVE
|
||||||
|
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import nconf from 'nconf';
|
|
||||||
import {
|
import {
|
||||||
NotFound,
|
NotFound,
|
||||||
} from '../libs/errors';
|
} from '../libs/errors';
|
||||||
|
|
||||||
const router = express.Router(); // eslint-disable-line new-cap
|
const router = express.Router(); // eslint-disable-line new-cap
|
||||||
|
|
||||||
const BASE_URL = nconf.get('BASE_URL');
|
|
||||||
|
|
||||||
router.all('*', (req, res, next) => {
|
router.all('*', (req, res, next) => {
|
||||||
const error = new NotFound(`API v2 is no longer supported, please use API v3 instead (${BASE_URL}/apidoc).`);
|
const error = new NotFound('API v2 is no longer supported, please use API v3 instead (https://apidoc.habitica.com).');
|
||||||
return next(error);
|
return next(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user