Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PUT PATCH DELETE methods #6

Merged
merged 6 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 20
- name: npm setup
run: npm install -g npm@latest
- name: Build and lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 20
- name: npm setup
run: npm install -g npm@latest
- name: Build and test
Expand Down
122 changes: 119 additions & 3 deletions API-Modules/v2-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,128 @@
V2 API documentation

## Table of Contents
- [/v2/sum](#endpt-1)
- [/v2/sum](#endpt-2)
- [/v2/data](#endpt-1)
- [/v2/data](#endpt-2)
- [/v2/data](#endpt-3)
- [/v2/sum](#endpt-4)
- [/v2/sum](#endpt-5)

___
###### endpt #1
```
DELETE - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- updates stored numbers

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"version": 1
}
```

Example Response:
```
[
true
]
```
___
###### endpt #2
```
PATCH - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- updates stored numbers

Params:

| Name | Type | Description |
|--|--|--|
| **a** | `integer` | a number (Optional)
| **b** | `integer` | a number (Optional)
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"a": 10,
"b": 25,
"version": 1
}
```

Example Response:
```
[
{
"a": 10,
"b": 25
}
]
```
___
###### endpt #3
```
PUT - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- stores numbers

Params:

| Name | Type | Description |
|--|--|--|
| **a** | `integer` | a number (*Required)
| **b** | `integer` | a number (*Required)
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"a": 10,
"b": 25,
"version": 1
}
```

Example Response:
```
[
{
"a": 10,
"b": 25
}
]
```
___
###### endpt #4
```
GET - /v2/sum
```

Expand Down Expand Up @@ -46,7 +162,7 @@ Example Response:
}
```
___
###### endpt #2
###### endpt #5
```
POST - /v2/sum
```
Expand Down
4 changes: 2 additions & 2 deletions AUTOGENERATED-API-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [/greetings/say](API-Modules/greetings-say-API.md) (1 total endpoint)
- [/greetings](API-Modules/greetings-API.md) (2 total endpoints)
- [/math](API-Modules/math-API.md) (2 total endpoints)
- [/v2](API-Modules/v2-API.md) (2 total endpoints)
- [/v2](API-Modules/v2-API.md) (5 total endpoints)
- [Misc](API-Modules/Misc-API.md) (2 total endpoints)

Total Endpoints: 9
Total Endpoints: 12
4 changes: 2 additions & 2 deletions PUBLIC-AUTOGENERATED-API-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [/greetings/say](Public-API-Modules/greetings-say-API.md) (1 total endpoint)
- [/greetings](Public-API-Modules/greetings-API.md) (2 total endpoints)
- [/math](Public-API-Modules/math-API.md) (1 total endpoint)
- [/v2](Public-API-Modules/v2-API.md) (2 total endpoints)
- [/v2](Public-API-Modules/v2-API.md) (5 total endpoints)
- [Misc](Public-API-Modules/Misc-API.md) (2 total endpoints)

Total Endpoints: 8
Total Endpoints: 11
122 changes: 119 additions & 3 deletions Public-API-Modules/v2-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,128 @@
V2 API documentation

## Table of Contents
- [/v2/sum](#endpt-1)
- [/v2/sum](#endpt-2)
- [/v2/data](#endpt-1)
- [/v2/data](#endpt-2)
- [/v2/data](#endpt-3)
- [/v2/sum](#endpt-4)
- [/v2/sum](#endpt-5)

___
###### endpt #1
```
DELETE - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- updates stored numbers

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"version": 1
}
```

Example Response:
```
[
true
]
```
___
###### endpt #2
```
PATCH - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- updates stored numbers

Params:

| Name | Type | Description |
|--|--|--|
| **a** | `integer` | a number (Optional)
| **b** | `integer` | a number (Optional)
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"a": 10,
"b": 25,
"version": 1
}
```

Example Response:
```
[
{
"a": 10,
"b": 25
}
]
```
___
###### endpt #3
```
PUT - /v2/data
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- stores numbers

Params:

| Name | Type | Description |
|--|--|--|
| **a** | `integer` | a number (*Required)
| **b** | `integer` | a number (*Required)
| **version** | `integer` | A version number (*Required)


Example Request:
```
{
"a": 10,
"b": 25,
"version": 1
}
```

Example Response:
```
[
{
"a": 10,
"b": 25
}
]
```
___
###### endpt #4
```
GET - /v2/sum
```

Expand Down Expand Up @@ -46,7 +162,7 @@ Example Response:
}
```
___
###### endpt #2
###### endpt #5
```
POST - /v2/sum
```
Expand Down
Loading
Loading