Skip to content

Commit

Permalink
chore(docs): update api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Mar 11, 2023
1 parent 37b4547 commit 50d7e1a
Show file tree
Hide file tree
Showing 6 changed files with 328 additions and 49 deletions.
29 changes: 2 additions & 27 deletions docs/api-reference/organizations/create-an-api-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,22 @@ See also: [Authentication](/getting-started/#prerequisites).

```shell
curl -X POST http://api.discue.io/v1/api_clients \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-KEY: API_KEY' \
-d '{
"id": "5bc2be68-7498-4853-aa64-4be0ca62934e",
"name": "example.com/dev"
}'
-H 'X-API-KEY: API_KEY'
```

</CodeGroupItem>

<CodeGroupItem title="javascript">

```javascript
const body = {
"id": "5bc2be68-7498-4853-aa64-4be0ca62934e",
"name": "example.com/dev"
}

const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-KEY':'API_KEY'
}

const response = await fetch('http://api.discue.io/v1/api_clients', {
method: 'POST', body, headers
method: 'POST', headers
})

const body = await response.json()
Expand All @@ -80,7 +69,6 @@ const body = await response.json()
```python
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-KEY': 'API_KEY'
}
Expand All @@ -103,7 +91,6 @@ import (
func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-API-KEY": []string{"API_KEY"},
}
Expand All @@ -121,22 +108,10 @@ func main() {

</CodeGroup>

## Body

```json
{
"id": "5bc2be68-7498-4853-aa64-4be0ca62934e",
"name": "example.com/dev"
}
```

## Parameters
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|pretty|query|boolean||Return the response pretty printed|
|body|body|[ApiClient](#schemaapiclient)||none|
|» name|body|string||none|
|» id|body|[ResourceId](#resourceid)||none|

## Responses

Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/organizations/update-an-api-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func main() {
|---|---|---|---|---|
|api_client_id|path|string(uuid)||none|
|pretty|query|boolean||Return the response pretty printed|
|body|body|[ApiClient](#schemaapiclient)||none|
|body|body|[ApiClientRef](#schemaapiclientref)||none|
|» name|body|string||none|
|» id|body|[ResourceId](#resourceid)||none|

Expand Down
8 changes: 1 addition & 7 deletions docs/api-reference/queue-listeners/get-a-listener-by-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,10 @@ func main() {
"liveness": {
"state": "stable",
"success_count": 1,
"last_success_at": 1644262937466,
"failure_count": 1,
"last_failure_status": 500,
"last_failure_at": 1644262937466,
"last_failure_msg": 1644262937466
"failure_count": 1
},
"messages": {
"acknowledged_count": 312,
"last_success_at": 1644616838173,
"last_failure_at": 1644616818173,
"missed": [
"fb445832-50f7-4471-a0a9-d0def6d5951f"
],
Expand Down
8 changes: 1 addition & 7 deletions docs/api-reference/queue-listeners/get-all-listeners.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,10 @@ func main() {
"liveness": {
"state": "stable",
"success_count": 1,
"last_success_at": 1644262937466,
"failure_count": 1,
"last_failure_status": 500,
"last_failure_at": 1644262937466,
"last_failure_msg": 1644262937466
"failure_count": 1
},
"messages": {
"acknowledged_count": 312,
"last_success_at": 1644616838173,
"last_failure_at": 1644616818173,
"missed": [
"fb445832-50f7-4471-a0a9-d0def6d5951f"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,10 @@ func main() {
"liveness": {
"state": "stable",
"success_count": 1,
"last_success_at": 1644262937466,
"failure_count": 1,
"last_failure_status": 500,
"last_failure_at": 1644262937466,
"last_failure_msg": 1644262937466
"failure_count": 1
},
"messages": {
"acknowledged_count": 312,
"last_success_at": 1644616838173,
"last_failure_at": 1644616818173,
"missed": [
"fb445832-50f7-4471-a0a9-d0def6d5951f"
],
Expand Down
Loading

0 comments on commit 50d7e1a

Please sign in to comment.