Skip to content

Commit e08dd38

Browse files
authored
Merge pull request #66 from IlyaChichkov/develop
Fix documentation
2 parents f3dd0fd + fd0522c commit e08dd38

7 files changed

Lines changed: 58 additions & 13 deletions

File tree

Source/RIMAPI/RimworldRestApi/BaseControllers/BillController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task GetBills(HttpListenerContext context)
2525
await ResponseBuilder.SendApiResult(context.Response, result);
2626
}
2727

28-
[Post("/api/v1/buildings/bills")]
28+
[Post("/api/v1/buildings/bills/add")]
2929
[EndpointMetadata("Create a new bill on a work table")]
3030
public async Task CreateBill(HttpListenerContext context)
3131
{
@@ -35,7 +35,7 @@ public async Task CreateBill(HttpListenerContext context)
3535
await context.SendJsonResponse(result);
3636
}
3737

38-
[Delete("/api/v1/buildings/bills")]
38+
[Delete("/api/v1/buildings/bills/remove")]
3939
[EndpointMetadata("Clear all bills from a work table")]
4040
public async Task ClearBills(HttpListenerContext context)
4141
{
@@ -54,7 +54,7 @@ public async Task GetBill(HttpListenerContext context)
5454
await context.SendJsonResponse(result);
5555
}
5656

57-
[Put("/api/v1/buildings/bill")]
57+
[Put("/api/v1/buildings/bill/update")]
5858
[EndpointMetadata("Update a bill on a work table")]
5959
public async Task UpdateBill(HttpListenerContext context)
6060
{
@@ -65,7 +65,7 @@ public async Task UpdateBill(HttpListenerContext context)
6565
await context.SendJsonResponse(result);
6666
}
6767

68-
[Delete("/api/v1/buildings/bill")]
68+
[Delete("/api/v1/buildings/bill/remove")]
6969
[EndpointMetadata("Delete a bill from a work table")]
7070
public async Task DeleteBill(HttpListenerContext context)
7171
{
@@ -104,7 +104,7 @@ public async Task GetAvailableRecipes(HttpListenerContext context)
104104
var buildingId = RequestParser.GetIntParameter(context, "building_id");
105105
var onlyResearched = RequestParser.GetBooleanParameter(context, "only_researched", false);
106106
var result = _billService.GetAvailableRecipes(buildingId, onlyResearched);
107-
await ResponseBuilder.SendApiResult(context.Response,result);
107+
await ResponseBuilder.SendApiResult(context.Response, result);
108108
}
109109

110110
[Get("/api/v1/map/work-tables")]

docs/_api_macroses/controllers/BillController.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
method: GET
8484
csharp_method: GetBills
8585

86-
"/api/v1/buildings/bills ":
86+
"/api/v1/buildings/bills/add":
8787
desc: Create a new bill and add it to the work table's queue.
8888
curl: |-
8989
**Example:**
@@ -120,7 +120,7 @@
120120
method: POST
121121
csharp_method: CreateBill
122122

123-
"/api/v1/buildings/bills ":
123+
"/api/v1/buildings/bills/remove":
124124
desc: Completely clear and delete all bills from a specific work table.
125125
curl: |-
126126
**Example:**
@@ -166,7 +166,7 @@
166166
method: GET
167167
csharp_method: GetBill
168168

169-
"/api/v1/buildings/bill ":
169+
"/api/v1/buildings/bill/update":
170170
desc: Update the configuration properties (like target count or allowed materials) of an existing bill.
171171
curl: |-
172172
**Example:**
@@ -202,7 +202,7 @@
202202
method: PUT
203203
csharp_method: UpdateBill
204204

205-
"/api/v1/buildings/bill ":
205+
"/api/v1/buildings/bill/remove":
206206
desc: Delete a single bill from the work table.
207207
curl: |-
208208
**Example:**

docs/_api_macroses/controllers/GameController.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,3 +861,48 @@ desc: This controller handles the general game functions.
861861
}
862862
```
863863
method: GET
864+
/api/v1/game/main-menu:
865+
desc: Return to the main menu from an active game session. Any unsaved progress will be lost.
866+
curl: |-
867+
**Example:**
868+
```bash
869+
curl --request POST \
870+
--url 'http://localhost:8765/api/v1/game/main-menu'
871+
```
872+
request: ""
873+
response: |-
874+
**Response:**
875+
```json
876+
{
877+
"success": true,
878+
"data": "Returning to main menu...",
879+
"errors": [],
880+
"warnings": [],
881+
"timestamp": "2026-04-01T17:13:42.0000000Z"
882+
}
883+
```
884+
method: POST
885+
csharp_method: GoToMainMenu
886+
887+
/api/v1/game/quit:
888+
desc: Completely shut down the RimWorld application and exit to the desktop.
889+
curl: |-
890+
**Example:**
891+
```bash
892+
curl --request POST \
893+
--url 'http://localhost:8765/api/v1/game/quit'
894+
```
895+
request: ""
896+
response: |-
897+
**Response:**
898+
```json
899+
{
900+
"success": true,
901+
"data": "Shutting down the game...",
902+
"errors": [],
903+
"warnings": [],
904+
"timestamp": "2026-04-01T17:13:42.0000000Z"
905+
}
906+
```
907+
method: POST
908+
csharp_method: QuitGame

tests/bruno_api_collection/Bills/Clear Bills.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info:
55

66
http:
77
method: DELETE
8-
url: "{{baseURL}}/api/v1/buildings/bills?building_id=25345"
8+
url: "{{baseURL}}/api/v1/buildings/bills/remove?building_id=25345"
99
params:
1010
- name: building_id
1111
value: "25345"

tests/bruno_api_collection/Bills/Create Bill.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info:
55

66
http:
77
method: POST
8-
url: "{{baseURL}}/api/v1/buildings/bills?building_id=25345"
8+
url: "{{baseURL}}/api/v1/buildings/bills/add?building_id=25345"
99
params:
1010
- name: building_id
1111
value: "25345"

tests/bruno_api_collection/Bills/Delete Bill.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info:
55

66
http:
77
method: DELETE
8-
url: "{{baseURL}}/api/v1/buildings/bill?building_id=25345&bill_id=2"
8+
url: "{{baseURL}}/api/v1/buildings/bill/remove?building_id=25345&bill_id=2"
99
params:
1010
- name: building_id
1111
value: "25345"

tests/bruno_api_collection/Bills/Update Bill.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info:
55

66
http:
77
method: PUT
8-
url: "{{baseURL}}/api/v1/buildings/bill?building_id=25345&bill_id=3"
8+
url: "{{baseURL}}/api/v1/buildings/bill/update?building_id=25345&bill_id=3"
99
params:
1010
- name: building_id
1111
value: "25345"

0 commit comments

Comments
 (0)