Skip to content

Commit

Permalink
Add admin API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Aug 27, 2024
1 parent 56139f3 commit ff7af65
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@

---

# Admin API

- [Methods](./admin-api/methods.md)

---

[Contributors](./contributors.md)
31 changes: 31 additions & 0 deletions src/admin-api/methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Areas

## createarea

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "createarea", "params": {"token": "xxx", "tags": {"url_alias": "test-area", "geo_json": {"type":"Point","coordinates":[0,0]}}}, "id": 1}' https://api.btcmap.org/rpc
```

## getarea

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "getarea", "params": {"token": "xxx", "area_id_or_alias": "test-area"}, "id": 1}' https://api.btcmap.org/rpc
```

## setareatag

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "setareatag", "params": {"token": "xxx", "area_id_or_alias": "test-area", "tag_name": "foo", "tag_value": "bar"}, "id": 1}' https://api.btcmap.org/rpc
```

## removeareatag

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "removeareatag", "params": {"token": "xxx", "area_id_or_alias": "test-area", "tag_name": "foo"}, "id": 1}' https://api.btcmap.org/rpc
```

## removearea

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "removearea", "params": {"token": "xxx", "area_id_or_alias": "test-area"}, "id": 1}' https://api.btcmap.org/rpc
```

0 comments on commit ff7af65

Please sign in to comment.