Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f1dbae9
test
ZakaHaceCosas Jun 3, 2024
20f1e94
test2
ZakaHaceCosas Jun 3, 2024
e9464a4
started docs
ZakaHaceCosas Jun 3, 2024
22d3d77
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 4, 2024
b519d09
finished usermanual + changed a rust fn bcus why not
ZakaHaceCosas Jun 4, 2024
e1be9de
asd
ZakaHaceCosas Jun 4, 2024
2fca7e7
html fix
ZakaHaceCosas Jun 4, 2024
0b42c18
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 4, 2024
ecbd975
update before pull
ZakaHaceCosas Jun 4, 2024
073f2f5
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 4, 2024
760dd33
docs
ZakaHaceCosas Jun 4, 2024
6cad49f
GOD, FINALLY
ZakaHaceCosas Jun 4, 2024
f1b9b47
quick update
ZakaHaceCosas Jun 4, 2024
e10753c
change name to avoid merge conflict
ZakaHaceCosas Jun 5, 2024
c320abe
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 5, 2024
01ac70d
asd
ZakaHaceCosas Jun 5, 2024
20c151d
starting
ZakaHaceCosas Jun 5, 2024
e1dd740
test 2 (gitbook aint working)
ZakaHaceCosas Jun 5, 2024
f8abc46
GITBOOK-1: No subject
ZakaHaceCosas Jun 5, 2024
a1d1685
gitbook is getting me confused
ZakaHaceCosas Jun 5, 2024
60d4e04
confusion 100
ZakaHaceCosas Jun 5, 2024
f00eff0
confusion 169
ZakaHaceCosas Jun 5, 2024
5f194fa
confusion 200
ZakaHaceCosas Jun 5, 2024
6becdc6
toc fix
ZakaHaceCosas Jun 5, 2024
e7b76ec
ok i think it works now
ZakaHaceCosas Jun 5, 2024
e718882
why do i need a commit just to preview >:v
ZakaHaceCosas Jun 5, 2024
5465191
user manual
ZakaHaceCosas Jun 5, 2024
6f0b8ac
A DAMN SPACE BROKE THE UI LOL
ZakaHaceCosas Jun 5, 2024
a54b998
a
ZakaHaceCosas Jun 5, 2024
4b37186
end html and start css
ZakaHaceCosas Jun 5, 2024
b312ac1
code typo
ZakaHaceCosas Jun 5, 2024
4e6cc8c
progressing
ZakaHaceCosas Jun 5, 2024
597f823
cool stuff
ZakaHaceCosas Jun 5, 2024
56346eb
progressss
ZakaHaceCosas Jun 5, 2024
2673b16
luau progress
ZakaHaceCosas Jun 5, 2024
4cf91d9
better lua explanation
ZakaHaceCosas Jun 5, 2024
b71c760
this table is making me go weird
ZakaHaceCosas Jun 5, 2024
eaf23ed
ok lua table fixed
ZakaHaceCosas Jun 5, 2024
107681e
ok table fix x2
ZakaHaceCosas Jun 5, 2024
1e7815a
progress in lua :D
ZakaHaceCosas Jun 5, 2024
289a861
added explanation of Luau naming thingy
ZakaHaceCosas Jun 5, 2024
0bf7af5
lua finish (i think)
ZakaHaceCosas Jun 5, 2024
ac3e052
site publishing + fix typo
ZakaHaceCosas Jun 5, 2024
ab92f6b
format from vite to gitbok
ZakaHaceCosas Jun 5, 2024
ca61b75
start webx api reference
ZakaHaceCosas Jun 5, 2024
f07847c
progress
ZakaHaceCosas Jun 5, 2024
cd9d8f5
finished formatting (i think)
ZakaHaceCosas Jun 5, 2024
fe0834c
path fix
ZakaHaceCosas Jun 5, 2024
f6b184e
PATH FIX 2
ZakaHaceCosas Jun 5, 2024
16c7194
PATH FIX 3 - THIS TIME MUST WORK ASKJDOSODSAHUDSAHIUDSHUHISDGADD8YSAT…
ZakaHaceCosas Jun 5, 2024
e5e2650
PATH FIX 4 this must be The fix.
ZakaHaceCosas Jun 5, 2024
c13c1a5
make the table a bit better
ZakaHaceCosas Jun 5, 2024
4f0dd41
removed old vitepress
ZakaHaceCosas Jun 5, 2024
a0617ef
updated the API docs to have the new attributes dor GET /domains and …
ZakaHaceCosas Jun 5, 2024
93668e7
better styling, API updates, typos, and stuff
ZakaHaceCosas Jun 5, 2024
3792077
fixed styling so colors make more sense
ZakaHaceCosas Jun 5, 2024
212677f
Merge branch 'face-hh:master' into master
ZakaHaceCosas Jun 5, 2024
a1b5442
image update
ZakaHaceCosas Jun 5, 2024
46ade7e
remove useless comments
ZakaHaceCosas Jun 5, 2024
bfa6f67
URL fix
ZakaHaceCosas Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Page
---
description: An alternative to the World Wide Web
---

test
# Welcome to WebX

Here you'll find usefull resources, like the User manual for using the WebX and the full developer docs.

## Main manuals

[User manual](for-users/basic-user-manual.md#first-thing-first-install-napture)

[Developer documentation](for-developers/getting-started.md#webx-developer-guide)

## Useful links

[Keybinds](for-users/advanced-user-manual.md#keybinds)

[WebX API reference](for-developers/api-reference.md#api-reference)
17 changes: 15 additions & 2 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Table of contents

* [Page](README.md)
* [Page 1](page-1.md)
* [Welcome to WebX](README.md)

## For users

* [User manual](for-users/basic-user-manual.md)
* [Advanced user manual](for-users/advanced-user-manual.md)

## For developers

* [Getting started](for-developers/getting-started.md)
* [HTML++](for-developers/html++.md)
* [CSS 3.25](for-developers/css-3.25.md)
* [Luau](for-developers/luau.md)
* [Site publishing & Domain registering](for-developers/site-publishing-and-domain-registering.md)
* [API Reference](for-developers/api-reference.md)
Binary file added docs/borderstyles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
333 changes: 333 additions & 0 deletions docs/for-developers/api-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,333 @@
# API Reference

How to work around with WebX's API, hosted at https://api.buss.lol.

This is the URI of the WebX API, which holds all the DNS of the network. You got different endpoints to do your stuff.
https://api.buss.lol/.

{% hint style="warning" %}
APIs have rate limits. They are provided in the headers.
{% endhint %}

## `GET` /
*Provides a basic message explaining the API.*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL |
| -------------- | ---------- |
| `GET` | https://api.buss.lol/ |
{% endhint %}

{% hint style="success" %}
### RETURNS
```txt
Hello, world! The available endpoints are:
GET /domains,
GET /domain/:name/:tld,
POST /domain,
PUT /domain/:key,
DELETE /domain/:key,
GET /tlds.
Ratelimits provided in headers.
```
{% endhint %}

## `GET` /domains`?amount={x}&page={y}`
Being `amount` and `page` optional. `amount` for the amount of domains you want the response to have per page (defaults to 15), and `page` what page you want to view.
*Allows you to get the list of all working domains from the network.*

{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL |
| -------------- | ---------- |
| `GET` | https://api.buss.lol/domains |
{% endhint %}

{% hint style="success" %}
### RETURNS

{% code title="response.json" overflow="wrap" lineNumbers="true" %}

```json
{
"domains": [
{
"tld": "it",
"name": "register",
"ip": "https://github.com/face-hh/webx-registrar"
},
{
"tld": "it",
"name": "dingle",
"ip": "https://github.com/face-hh/dingle-frontend"
}
],
...
"page": 1,
"limit": 15
}
```

{% endcode %}

{% endhint %}

## `GET` /tlds
*Allows you to get the list of all valid TLDS.*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL |
| -------------- | ---------- |
| `GET` | https://api.buss.lol/tlds |
{% endhint %}

{% hint style="success" %}
### RETURNS
`200 OK`
```json
["mf", "btw", "fr", "yap", "dev", "scam", "zip", "root", "web", "rizz", "habibi", "sigma", "now", "it", "soy", "lol", "uwu"]
```
{% endhint %}

## `GET` /domain/`name`/`tld`
*Allows you to get the data from a specific domain.*<br/>
***Being `name` the domain name (e.g. "register") and `tld` it's TLD (e.g. "it").***
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL |
| -------------- | ---------- |
| `GET` | https://api.buss.lol/domain/name/tld |
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF DOMAIN DOES EXIST
```json
{
"tld":"it",
"name":"register",
"ip":"https://github.com/face-hh/webx-registrar"
}
```
{% endhint %}

{% hint style="danger" %}
### IF DOMAIN DOES NOT EXIST
*Does not return anything.*
{% endhint %}

## `POST` /domain
*Allows you to register a domain from the API*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL | HEADERS |
| -------------- | ---------- | ------- |
| `POST` | https://api.buss.lol/domain | `Content-Type: application/json` |

***AND BODY:***
```json
{
"tld": "{tld}",
"name": "{name}",
"ip": "{ip}"
}
```
*Being `{name}` the `name` you want to use as the domain, `{tld}` the TLD you want to use, and `{ip}` the IP / GitHub URL you want to serve from.*
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF THE DOMAIN IS CREATED
`200 OK`
```json
{
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name",
"secret_key": "generated_secret_key"
}
```
{% endhint %}

{% hint style="danger" %}
### IF THE BODY OF YOUR `POST` REQUEST IS NOT VALID
`400 Bad Request`

### IF `{name}` (domain name) IS ALREADY REGISTERED WITH THAT TLD
`409 Bad Request`

### IF RATE LIMIT HAS BEEN EXCEEDED
`429 Too Many Requests`
{% endhint %}

## `POST` /domain/check
*Allows you to "search" for domains using domain names and TLDs*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL | HEADERS |
| -------------- | ---------- | ------- |
| `POST` | https://api.buss.lol/domain/check | *None* |

***AND BODY:***
```json
{
"tld": "{tld}",
"name": "{name}"
}
```
*Being `{name}` the `name` you want to search for, and `{tld}` an ***optional*** parameter to also search for a specific TLD.*
{% endhint %}

{% hint style="info" %}
Quick reminder: unless specified, all parameters are required.
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF THE DOMAIN IS CREATED
`200 OK`
```json
{
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name",
"secret_key": "generated_secret_key"
}
```
{% endhint %}

{% hint style="danger" %}
### IF THE BODY OF YOUR `POST` REQUEST IS NOT VALID
`400 Bad Request`

### IF `{name}` (domain name) IS ALREADY REGISTERED WITH THAT TLD
`409 Bad Request`

### IF RATE LIMIT HAS BEEN EXCEEDED
`429 Too Many Requests`
{% endhint %}

## `PUT` /domain/`key`
*Allows you to update your domain's IP / GitHub URL. The code's source, basically.*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL | HEADERS |
| -------------- | ---------- | ------- |
| `PUT` | https://api.buss.lol/domain/:key | `Content-Type: application/json` |

*Being `:key` your domain's secret key.*

***AND BODY:***
```json
{
"ip": "{ip}"
}
```
*Being `{ip}` the new IP you want to set for your domain.*
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF THE IP IS CORRECTLY UPDATED
`200 OK`

{% code title="response.json" overflow="wrap" lineNumbers="true" %}

```json
{
"ip": "new_ip"
}
```

{% endcode %}

{% endhint %}

{% hint style="danger" %}
### IF THE BODY OF YOUR `PUT` REQUEST IS NOT VALID *OR* SPECIFIED `KEY` IS NOT VALID
`400 Bad Request`

### IF THE DOMAIN IS NOT FOUND
`404 Bad Request`
{% endhint %}

## `DELETE` /domain/`key`
*Allows you to delete your domain from the network. You cannot undo that, so be careful.*
{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL | HEADERS |
| -------------- | ---------- | ------- |
| `DELETE` | https://api.buss.lol/domain/:key | *No headers required* |

*Being `:key` your domain's secret key.*
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF THE DOMAIN IS CORRECTLY REMOVED
`200 OK`
{% endhint %}

{% hint style="danger" %}
### IF THE REQUEST HAS AN INVALID PARAMETER
`400 Bad Request`

### IF THE DOMAIN IS NOT FOUND
`404 Bad Request`
{% endhint %}

## `POST` /registry/domain
*Allows to create your own domain using an API key.*

{% hint style="warning" %}
This is disabled by default as you will need to come up with your own way of validating and distributing API Keys.
{% endhint %}

{% hint style="info" %}
### YOU SEND
| REQUEST METHOD | TARGET URL | HEADERS |
| -------------- | ---------- | ------- |
| `POST` | https://api.buss.lol/registry/domain/ | `Content-Type: application/json; Authorization = name:token` |

*Being `:token` your API key.*

***AND BODY:***
```json
{
"tld": "{tld}",
"name": "{name}",
"ip": "{ip}"
}
```
*Being `{name}` the `name` you want to use as the domain, `{tld}` the TLD you want to use, and `{ip}` the IP / GitHub URL you want to serve from.*
{% endhint %}

{% hint style="success" %}
### RETURNS
### IF THE DOMAIN IS SUCCESSFULLY CREATED
`200 OK`
```json
{
"tld": "example_tld",
"ip": "example_ip",
"name": "example_name",
"secret_key": "generated_secret_key"
}
```
{% endhint %}

{% hint style="danger" %}
### IF THE BODY OF YOUR `POST` REQUEST IS NOT VALID
`400 Bad Request`

### IF THE API KEY SYSTEM IS DISABLED
(It can be.)

`403 Not allowed`

### IF THE REQUEST DOMAIN IS ALREADY REGISTERED
`409 Conflict`

### IF THE RATE LIMIT IS EXCEEDED
`429 Too many requests`
{% endhint %}
Loading