Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/rivet-go-sdk
Go SDK for the Rivet API
https://github.com/speakeasy-sdks/rivet-go-sdk
gaming go multiplayer sdk
Last synced: 2 days ago
JSON representation
Go SDK for the Rivet API
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/rivet-go-sdk
- Owner: speakeasy-sdks
- Created: 2023-02-09T14:17:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:12:40.000Z (7 months ago)
- Last Synced: 2024-06-19T18:04:31.472Z (5 months ago)
- Topics: gaming, go, multiplayer, sdk
- Language: Go
- Homepage: https://docs.rivet.gg/general/introduction
- Size: 58.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rivet Go SDK
The backbone of Multiplayer Experiences. [Simple APIs for serverless lobbies, matchmaking, CDN, and other features](https://docs.rivet.gg/general/introduction) managed directly within an easy to use dashboard. Launch your multiplayer game on any platform with the tools you already use.
## SDK Installation
```bash
go get github.com/speakeasy-sdks/rivet-go-sdk
```## Authentication
Signup for [access]([https://www.leapml.dev/signup](https://hub.rivet.gg/developer/dashboard)) to Rivet to use the API.
## SDK Example Usage
```go
package mainimport (
"log"
"github.com/speakeasy-sdks/rivet-go-sdk"
"github.com/speakeasy-sdks/rivet-go-sdk/pkg/models/shared"
"github.com/speakeasy-sdks/rivet-go-sdk/pkg/models/operations"
)func main() {
s := rivet.New()
req := operations.LobbiesServiceFindRequest{
Security: operations.LobbiesServiceFindSecurity{
BearerAuth: &shared.SchemeBearerAuth{
Authorization: "Bearer YOUR_BEARER_TOKEN_HERE",
},
},
Headers: operations.LobbiesServiceFindHeaders{
Origin: "unde",
},
Request: operations.LobbiesServiceFindRequestBody{
Captcha: "deserunt",
GameModes: []string{
"nulla",
"id",
"vero",
},
PreventAutoCreateLobby: false,
Regions: []string{
"nihil",
"fuga",
"facilis",
"eum",
},
},
}
res, err := s.MatchmakerLobbies.LobbiesServiceFind(ctx, req)
if err != nil {
log.Fatal(err)
}if res.MatchmakerFindLobbyOutput != nil {
// handle response
}
```## SDK Available Operations
### MatchmakerLobbies
* `LobbiesServiceFind` - Finds a lobby based on the given criteria.
If a lobby is not found and `prevent_auto_create_lobby` is `true`,
a new lobby will be created.* `LobbiesServiceJoin` - Joins a specific lobby.
This request will use the direct player count configured for the
lobby group.* `LobbiesServiceList` - Lists all open lobbies.
* `LobbiesServiceSetClosed` - If `is_closed` is `true`, players will be prevented from joining the lobby.
Does not shutdown the lobby.### MatchmakerRegions
* `RegionsServiceList` - Returns a list of regions available to this namespace.
Regions are sorted by most optimal to least optimal. The player's IP address
is used to calculate the regions' optimality.### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)