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

SDK Matrices for NodeJS, C#, CPP, REST #3548

Merged
merged 8 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
19 changes: 19 additions & 0 deletions site/content/en/docs/Guides/Client SDKs/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,25 @@ sdk->WatchGameServer([](const agones::dev::sdk::GameServer& gameserver){
});
```

## SDK Functionality

| Area | Action | Implemented |
|-----------------|---------------------|-------------|
| Counters | GetCounterCount | ❌ |
| Counters | SetCounterCount | ❌ |
| Counters | IncrementCounter | ❌ |
| Counters | DecrementCounter | ❌ |
| Counters | SetCounterCapacity | ❌ |
| Counters | GetCounterCapacity | ❌ |
| Lists | AppendListValue | ❌ |
| Lists | DeleteListValue | ❌ |
| Lists | SetListCapacity | ❌ |
| Lists | GetListCapacity | ❌ |
| Lists | ListContains | ❌ |
| Lists | GetListLength | ❌ |
| Lists | GetListValues | ❌ |


For more information, you can also read the [SDK Overview]({{< relref "_index.md" >}}), check out
{{< ghlink href="sdks/cpp/include/agones/sdk.h" >}}sdk.h{{< /ghlink >}} and also look at the
{{< ghlink href="examples/cpp-simple" >}}C++ example{{< / >}}.
Expand Down
19 changes: 19 additions & 0 deletions site/content/en/docs/Guides/Client SDKs/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,25 @@ var playerId = "player1";
bool isConnected = await agones.Alpha().IsPlayerConnectedAsync(playerId);
```

## SDK Functionality

| Area | Action | Implemented |
|-----------------|---------------------|-------------|
| Counters | GetCounterCount | ❌ |
| Counters | SetCounterCount | ❌ |
| Counters | IncrementCounter | ❌ |
| Counters | DecrementCounter | ❌ |
| Counters | SetCounterCapacity | ❌ |
| Counters | GetCounterCapacity | ❌ |
| Lists | AppendListValue | ❌ |
| Lists | DeleteListValue | ❌ |
| Lists | SetListCapacity | ❌ |
| Lists | GetListCapacity | ❌ |
| Lists | ListContains | ❌ |
| Lists | GetListLength | ❌ |
| Lists | GetListValues | ❌ |


## Remarks
- All requests other than `ConnectAsync` will wait for up to 15 seconds before giving up, time to wait can also be set in the constructor.
- Default host & port are `localhost:9357`
Expand Down
19 changes: 19 additions & 0 deletions site/content/en/docs/Guides/Client SDKs/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,23 @@ agonesSDK.watchGameServer((result) => {

To mark the game server as [reserved]({{< relref "_index.md#reserveseconds" >}}) for a period of time, call the async method `reserve(seconds)`. The result will be an empty object.

## SDK Functionality

| Area | Action | Implemented |
|-----------------|---------------------|-------------|
| Counters | GetCounterCount | ❌ |
| Counters | SetCounterCount | ❌ |
| Counters | IncrementCounter | ❌ |
| Counters | DecrementCounter | ❌ |
| Counters | SetCounterCapacity | ❌ |
| Counters | GetCounterCapacity | ❌ |
| Lists | AppendListValue | ❌ |
| Lists | DeleteListValue | ❌ |
| Lists | SetListCapacity | ❌ |
| Lists | GetListCapacity | ❌ |
| Lists | ListContains | ❌ |
| Lists | GetListLength | ❌ |
| Lists | GetListValues | ❌ |


For more information, please read the [SDK Overview]({{< relref "_index.md" >}}), check out {{< ghlink href="sdks/nodejs/src/agonesSDK.js" >}}agonesSDK.js{{< /ghlink >}} and also look at the {{< ghlink href="examples/nodejs-simple" >}}Node.js example{{< / >}}.
12 changes: 12 additions & 0 deletions site/content/en/docs/Guides/Client SDKs/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ The same could be run for `alpha.swagger.json` and `beta.swagger.json` as requir

You can read more about OpenAPI/Swagger code generation in their [Command Line Tool Documentation](https://swagger.io/docs/open-source-tools/swagger-codegen/)

## SDK Functionality

| Area | Action | Implemented |
|-----------|--------------------------------------------------------|-------------|
| Counters | GET /v1alpha1/counters/{name} | ✔️ |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part looks good to me. Do we want to add rows for other funcations like the other SDKs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same question 🙋‍♀️

@igooch Looking forward to your inputs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what Mark envisioned here, but I would start similarly to the "Action" column like we have in https://agones.dev/site/docs/guides/client-sdks/go/. Then below we can include the Path, Method, Body for each action. The actions for Counters areGetCounter UpdateCounter and for Lists GetList UpdateList AddListValue RemoveListValue.

I would also include the existing actions "Ready", "Health" etc. that are named below in this doc. (The generated client API is at agones/test/sdk/restapi/swagger/api_sdk.go if you want to see the method names.)

| Counters | PATCH /v1alpha1/counters/{counterUpdateRequest.name} | ✔️ |
| Lists | PATCH /v1alpha1/lists/{list.name} | ✔️ |
| Lists | GET /v1alpha1/lists/{name} | ✔️ |
| Lists | POST /v1alpha1/lists/{name}:addValue | ✔️ |
| Lists | POST /v1alpha1/lists/{name}:removeValue | ✔️ |

Kalaiselvi84 marked this conversation as resolved.
Show resolved Hide resolved

## Reference

### Lifecycle Management
Expand Down