Skip to content

Commit

Permalink
Update methods.md
Browse files Browse the repository at this point in the history
Updated to use password in RPC calls
  • Loading branch information
dadofsambonzuki authored Oct 2, 2024
1 parent 39f3d97 commit 052d2a2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/admin-api/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- id

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

## setelementtag
Expand All @@ -16,7 +16,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "getelement", "params": {"token
- value

```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
curl --data-binary '{"jsonrpc": "2.0", "method": "setelementtag", "params": {"password": "xxx", "id": "node:12141608846", "name": "foo", "value": "bar"}, "id": 1}' https://api.btcmap.org/rpc
```

## removeelementtag
Expand All @@ -26,7 +26,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "setelementtag", "params": {"to
- tag

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

## boostelement
Expand All @@ -36,7 +36,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "removeelementtag", "params": {
- days

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

## addelementcomment
Expand All @@ -46,7 +46,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "boostelement", "params": {"tok
- comment

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

<!-- ## generateelementissues -->
Expand All @@ -59,7 +59,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "addelementcomment", "params":
- tags

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

## getarea
Expand All @@ -68,7 +68,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "addarea", "params": {"token":
- id

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

## setareatag
Expand All @@ -79,7 +79,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "getarea", "params": {"token":
- value

```bash
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
curl --data-binary '{"jsonrpc": "2.0", "method": "setareatag", "params": {"password": "xxx", "id": "test-area", "name": "foo", "value": "bar"}, "id": 1}' https://api.btcmap.org/rpc
```

## removeareatag
Expand All @@ -89,7 +89,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "setareatag", "params": {"token
- tag

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

## gettrendingcountries
Expand All @@ -99,7 +99,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "removeareatag", "params": {"to
- period_end

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcountries", "params": {"token": "xxx", "period_start": "2024-01-01", "period_end": "2024-02-01"}, "id": 1}' https://api.btcmap.org/rpc
curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcountries", "params": {"password": "xxx", "period_start": "2024-01-01", "period_end": "2024-02-01"}, "id": 1}' https://api.btcmap.org/rpc
```

## gettrendingcommunities
Expand All @@ -109,7 +109,7 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcountries", "params
- period_end

```bash
curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcommunities", "params": {"token": "xxx", "period_start": "2024-01-01", "period_end": "2024-02-01"}, "id": 1}' https://api.btcmap.org/rpc
curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcommunities", "params": {"password": "xxx", "period_start": "2024-01-01", "period_end": "2024-02-01"}, "id": 1}' https://api.btcmap.org/rpc
```

## removearea
Expand All @@ -118,5 +118,5 @@ curl --data-binary '{"jsonrpc": "2.0", "method": "gettrendingcommunities", "para
- id

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

0 comments on commit 052d2a2

Please sign in to comment.