Skip to content

Commit

Permalink
Add missing @group annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
gpene authored and tomglenn committed Feb 3, 2022
1 parent 1d0527e commit 15e86c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions server/runtime_go_nakama.go
Expand Up @@ -1957,6 +1957,7 @@ func (n *RuntimeGoNakamaModule) StorageDelete(ctx context.Context, deletes []*ru
return err
}

// @group users
// @summary Update account, storage, and wallet information simultaneously.
// @param ctx(type=context.Context) The context object represents information about the server and requester.
// @param accountUpdates(type=[]*runtime.AccountUpdate) Array of account information to be updated.
Expand Down Expand Up @@ -3270,6 +3271,7 @@ func (n *RuntimeGoNakamaModule) UserGroupsList(ctx context.Context, userID strin
return groups.UserGroups, groups.Cursor, nil
}

// @group events
// @summary Generate an event.
// @param ctx(type=context.Context) The context object represents information about the server and requester.
// @param evt(type=*api.Event) The event to be generated.
Expand Down
7 changes: 6 additions & 1 deletion server/runtime_javascript_nakama.go
Expand Up @@ -258,6 +258,7 @@ func (n *runtimeJavascriptNakamaModule) mappings(r *goja.Runtime) map[string]fun
}
}

// @group utils
// @summary Convert binary data to string.
// @param data(type=Uint8Array) The binary data to be converted.
// @return result(type=string) The resulting string.
Expand All @@ -281,6 +282,7 @@ func (n *runtimeJavascriptNakamaModule) binaryToString(r *goja.Runtime) func(goj
}
}

// @group utils
// @summary Convert string data to binary.
// @param str(type=string) The string to be converted.
// @return result(type=Uint8Array) The resulting binary data.
Expand All @@ -300,6 +302,7 @@ func (n *runtimeJavascriptNakamaModule) stringToBinary(r *goja.Runtime) func(goj
}
}

// @group events
// @summary Generate an event.
// @param event_name(type=string) The name of the event to be created.
// @param properties(type=[]string) An array of event properties.
Expand Down Expand Up @@ -4280,6 +4283,7 @@ func (n *runtimeJavascriptNakamaModule) storageDelete(r *goja.Runtime) func(goja
}
}

// @group users
// @summary Update account, storage, and wallet information simultaneously.
// @param accountUpdates(type=nkruntime.AccountUpdate) Array of account information to be updated.
// @param storageWrites(type=nkruntime.StorageWriteRequest[]) Array of storage objects to be updated.
Expand Down Expand Up @@ -4998,7 +5002,7 @@ func (n *runtimeJavascriptNakamaModule) leaderboardsGetId(r *goja.Runtime) func(
}
}

// @group Leaderboards
// @group leaderboards
// @summary Fetch the list of leaderboard records around the owner.
// @param id(type=string) The unique identifier for the leaderboard.
// @param owner(type=string) The owner of the score to list records around. Mandatory field.
Expand Down Expand Up @@ -6637,6 +6641,7 @@ func (n *runtimeJavascriptNakamaModule) groupUsersAdd(r *goja.Runtime) func(goja
}
}

// @group groups
// @summary Ban users from a group.
// @param groupId(string) The ID of the group to ban users from.
// @param userIds(string[]) Table array of user IDs to ban from this group.
Expand Down
5 changes: 2 additions & 3 deletions server/runtime_lua_nakama.go
Expand Up @@ -501,15 +501,13 @@ func (n *RuntimeLuaNakamaModule) runOnce(l *lua.LState) int {
return 0
}

// @summary Get the current runtime environment configuration.
// @return ctx(table) Configuration details.
// @return error(error) An optional error value if an error occurred.
func (n *RuntimeLuaNakamaModule) getContext(l *lua.LState) int {
ctx := NewRuntimeLuaContext(l, n.config.GetName(), RuntimeLuaConvertMapString(l, n.config.GetRuntime().Environment), RuntimeExecutionModeRunOnce, nil, nil, 0, "", "", nil, "", "", "", "")
l.Push(ctx)
return 1
}

// @group events
// @summary Generate an event.
// @param name(type=string) The name of the event to be created.
// @param properties(type=OptTable) A table of event properties.
Expand Down Expand Up @@ -5697,6 +5695,7 @@ func (n *RuntimeLuaNakamaModule) storageDelete(l *lua.LState) int {
return 0
}

// @group users
// @summary Update account, storage, and wallet information simultaneously.
// @param accountUpdates(type=OptTable) List of account information to be updated.
// @param storageWrites(type=OptTable) List of storage objects to be updated.
Expand Down

0 comments on commit 15e86c4

Please sign in to comment.