This repository was archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
III.1. Static data
Andrey Bogdanov edited this page Mar 31, 2016
·
14 revisions
Static data is retrieved using HTTP GET method. No changes on the server side are made. The data returned is guaranteed to not change until the server is restarted, so it may be cached safely.
- Get base site description
- Get specific board description
- Get all boards description
- Get UI translations
- Get list of template partials
- Get statistics
/misc/base.json
Returns site information: date format, supported captcha engines, etc.
Example:
{
"server": {
"uptime": 147696.377
},
"site": {
"protocol": "http",
"domain": "localhost:8080",
"pathPrefix": "",
"locale": "en",
"dateFormat": "DD/MM/YYYY ddd HH:mm:ss",
"timeOffset": 180,
"vkontakte": {
"integrationEnabled": true,
"appId": "Your VK API app ID"
},
"twitter": {
"integrationEnabled": true
}
},
"user": {
"ip": "Your IP (IPv6)",
"hashpass": "Your hashpass",
"levels": {
"3dpd": "SUPERUSER",
"a": "SUPERUSER",
"b": "SUPERUSER",
...
},
"loggedIn": true
},
"styles": [
{
"name": "burichan",
"title": "Burichan"
},
{
"name": "futaba",
"title": "Futaba"
},
...
],
"codeStyles": [
{
"name": "agate",
"title": "Agate"
},
{
"name": "androidstudio",
"title": "Android Studio"
},
...
],
"availableCodeLangs": [
{
"id": "accesslog",
"name": "access.log"
},
{
"id": "actionscript",
"name": "ActionScript"
},
...
],
"maxSearchQueryLength": 50,
"markupModes": [
{
"name": "NONE",
"title": "No markup"
},
{
"name": "EXTENDED_WAKABA_MARK",
"title": "Extender WakabaMark only"
},
{
"name": "BB_CODE",
"title": "bbCode only"
},
{
"name": "EXTENDED_WAKABA_MARK,BB_CODE",
"title": "Extended WakabaMark and bbCode"
}
],
"supportedCaptchaEngines": [
{
"id": "codecha",
"title": "Codecha - programmers captcha",
"publicKey": "Your Codecha public key",
"scriptSource": "/js/codecha-script.js",
"widgetTemplate": "codechaWidget"
},
{
"id": "google-recaptcha",
"title": "Google reCAPTCHA",
"publicKey": "Your Google reCAPTCHA public key",
"scriptSource": "https://www.google.com/recaptcha/api.js",
"widgetTemplate": "googleRecaptchaWidget"
},
...
]
}
/misc/board/<board_name>.json
Returns the description of a specific board.
Example:
{
"board": {
"name": "b",
"title": "/b/rotherhood",
"defaultUserName": "Anonympus",
"showWhois": false,
"hidden": false,
"postingEnabled": true,
"captchaEnabled": true,
"maxEmailLength": 150,
"maxNameLength": 50,
"maxSubjectLength": 150,
"maxTextLength": 15000,
"maxPasswordLength": 50,
"maxFileCount": 1,
"maxFileSize": 15728640,
"maxLastPosts": 3,
"markupElements": [
"BOLD",
"ITALICS",
"STRIKED_OUT",
"UNDERLINED",
"SPOILER",
"QUOTATION",
"UNORDERED_LIST",
"ORDERED_LIST",
"LIST_ITEM",
"SUBSCRIPT",
"SUPERSCRIPT",
"URL"
],
"supportedFileTypes": [
"application/ogg",
"application/pdf",
"audio/mpeg",
"audio/ogg",
"audio/wav",
"image/gif",
"image/jpeg",
"image/png",
"video/mp4",
"video/ogg",
"video/webm"
],
"supportedCaptchaEngines": [
{
"id": "codecha",
"title": "Codecha - programmers captcha",
"publicKey": "Your Codecha public key",
"scriptSource": "/js/codecha-script.js",
"widgetTemplate": "codechaWidget"
},
{
"id": "google-recaptcha",
"title": "Google reCAPTCHA",
"publicKey": "Your Google reCAPTCHA public key",
"scriptSource": "https://www.google.com/recaptcha/api.js",
"widgetTemplate": "googleRecaptchaWidget"
},
...
],
"bumpLimit": 500,
"postLimit": 1000,
"bannerFileNames": [
"1.png",
"2.gif"
],
"launchDate": "2015-02-12T21:00:00.000Z"
}
}
/misc/boards.json
Returns an array of objects describing all available boards.
Example:
{
"boards": [
{board},
...
]
}
Note: See III.1. Static data for {board} object example.
/misc/tr.json
Returns an object-map of UI translations.
Example:
{
"tr": {
"toMarkupPageText": "Markup",
"toHomePageText": "Homepage",
"framedVersionText": "Framed version",
...
}
}
/misc/partials.json
Returns an array of all available template partials.
Example:
[
"chatContact",
"createAction",
"favoritesElement",
"fileInputs",
"innerNavbar",
"my-avatarList",
"post",
"postFile",
"postFileThumb",
"postName",
"postReference",
"postReferringPosts",
"postSubject",
"setVotingOpenedForm"
]
/misc/statistics.json
Returns an object representing the statistics.
Example:
{
"boards": [
{
"name": "3dpd",
"title": "3D pron",
"diskUsage": 614428432,
"postCount": 166,
"postingSpeed": "12.2 post(s)/month.",
"fileCount": 333
},
...,
"total": {
"postCount": 31284,
"fileCount": 10706,
"diskUsage": 8330332399,
"postingSpeed": "3.2 post(s)/hour"
}