Skip to content

Commit 4f1533a

Browse files
committed
feat: support Factorio 2.x
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
1 parent ef7421e commit 4f1533a

33 files changed

+33922
-1078
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Factorio RCON API
22

3-
> [Live API Docs](https://factorio-rcon-api.ayaka.io/apis/docs)
3+
> [Live API Docs](https://factorio-rcon-api.ayaka.io/apis/docs/v2)
44
55
🏭 Fully implemented wrapper for Factorio headless server console as RESTful and gRPC for easier management through APIs
66

@@ -179,7 +179,7 @@ to get the version of the Factorio game server.
179179

180180
For API documentation, we offer Scalar powered OpenAPI UI under `/apis/docs` endpoint.
181181

182-
With the demo server at [https://factorio-rcon-api.ayaka.io/apis/docs](https://factorio-rcon-api.ayaka.io/apis/docs) live, you can view the full API documentations there, or you can run the API server locally and access the documentation at [http://localhost:24180/apis/docs](http://localhost:24180/apis/docs).
182+
With the demo server at [https://factorio-rcon-api.ayaka.io/apis/docs/v2](https://factorio-rcon-api.ayaka.io/apis/docs/v2) live, you can view the full API documentations there, or you can run the API server locally and access the documentation at [http://localhost:24180/apis/docs/v2](http://localhost:24180/apis/docs/v2).
183183

184184
Alternatively, we ship the OpenAPI v2 and v3 spec in the repository:
185185

apis/factorioapi/v1/command.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/factorioapi/v1/command.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ message CommandTimeRequest {
128128
}
129129

130130
message CommandTimeResponse {
131-
double time = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "10"}]; // Get info about how old the map is.
131+
double time = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "10"}]; // Get info about how old the map is, in seconds.
132132
}
133133

134134
message CommandSeedRequest {

apis/factorioapi/v1/v1.pb.go

Lines changed: 28 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/factorioapi/v1/v1.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ option go_package = "github.com/nekomeowww/factorio-rcon-api/apis/factorioapi/v1
88
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
99
info: {
1010
title: "Factorio RCON API";
11+
description: "API wrapper over Factorio's RCON protocol. **This is the v1 version of the API, made for Factorio <2.x. For players and developers on Factorio 2.x (especially with Space Age DLC), you should use v2 endpoints.**";
1112
version: "1.0";
1213
};
1314
responses: {

0 commit comments

Comments
 (0)