Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Commit

Permalink
Update RPC docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Aug 28, 2024
1 parent ff7af65 commit 3aa1068
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions src/admin-api/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,49 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "createarea", "params": {"token
## 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
curl --data-binary '{"jsonrpc": "2.0", "method": "getarea", "params": {"token": "xxx", "id": "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
curl --data-binary '{"jsonrpc": "2.0", "method": "setareatag", "params": {"token": "xxx", "id": "test-area", "name": "foo", "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
curl --data-binary '{"jsonrpc": "2.0", "method": "removeareatag", "params": {"token": "xxx", "id": "test-area", "tag": "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
curl --data-binary '{"jsonrpc": "2.0", "method": "removearea", "params": {"token": "xxx", "id": "test-area"}, "id": 1}' https://api.btcmap.org/rpc
```

# Elements

## getelement

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "getelement", "params": {"token": "xxx", "id": "node:12141608846"}, "id": 1}' https://api.btcmap.org/rpc
```

## setelementtag

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "setelementtag", "params": {"token": "xxx", "id": "node:12141608846", "name": "foo", "value": "bar"}, "id": 1}' https://api.btcmap.org/rpc
```

## removeelementtag

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "removeelementtag", "params": {"token": "xxx", "id": "node:12141608846", "tag": "foo"}, "id": 1}' https://api.btcmap.org/rpc
```

## boostelement

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "boostelement", "params": {"token": "xxx", "id": "node:12141608846", "days": 7}, "id": 1}' https://api.btcmap.org/rpc
```

0 comments on commit 3aa1068

Please sign in to comment.