Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn committed Apr 2, 2024
1 parent e3996d8 commit dd955e0
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,49 @@ tzf-server -type 1

## Web Pages

> [!NOTE]
>
> Please note that the live demo below is runned on a free plan of Render, so it
> may take a while to start the server. Please do not use it for production.
### All supported timezone names

[`http://localhost:8080/web/tzs/all`](http://localhost:8080/web/tzs/all)
- [`http://localhost:8080/web/tzs/all`](http://localhost:8080/web/tzs/all)
- Live demo: <https://tzf-server.onrender.com/web/tzs/all>

### [Experiment] Clickable debugger

[`http://localhost:8080/web/click`](http://localhost:8080/web/click)
- [`http://localhost:8080/web/click`](http://localhost:8080/web/click)
- Live demo: <https://tzf-server.onrender.com/web/click>

I have little knowledge about frontend development so it's just a experiment,
most codes are written by ChatGPT 3.5. You can access the prompts from
[gist](https://gist.github.com/ringsaturn/12b5509d80f69e7bca13da8745f7ce15).

## HTTP API

> [!NOTE]
>
> Please note that the live demo below is runned on a free plan of Render, so it
> may take a while to start the server. Please do not use it for production.
A swagger UI can be found at
[`http://localhost:8080/swagger/index.html`](http://localhost:8080/swagger/index.html).

Or live demo: <https://tzf-server.onrender.com/swagger/index.html>

### Lookup Location's timezone

```bash
curl "http://localhost:8080/api/v1/tz?longitude=116.3883&latitude=39.9289"
```

or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tz?longitude=116.3883&latitude=39.9289"
```

Output:

```json
Expand All @@ -127,6 +147,12 @@ Output:
curl "http://localhost:8080/api/v1/tzs?longitude=87.6168&latitude=43.8254"
```

or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tzs?longitude=87.6168&latitude=43.8254"
```

Output:

```json
Expand All @@ -152,6 +178,12 @@ Output:
curl "http://localhost:8080/api/v1/tzs/all"
```

or live demo:

```bash
curl "https://tzf-server.onrender.com/api/v1/tzs/all"
```

Output:

```jsonc
Expand Down

0 comments on commit dd955e0

Please sign in to comment.