Create your own challenge goals assignment Extend Override app
Overview
This article explains the API contract (Protobuf) used in the Extend Override app for challenge goals assignment.
service AssignmentFunction {
rpc Assign(AssignmentRequest) returns (AssignmentResponse) {}
}
API Contract
Assign
The Assign
function is triggered when a user makes a request to the publicGetUserProgression endpoint. This occurs if the user has not yet been assigned any goals.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.ChallengeAssignment.Demo.Server/Services/ChallengeAssignmentService.cs
.
public override async Task<AssignmentResponse> Assign(AssignmentRequest request, ServerCallContext context)
{
...
}
In the app, the following function can be found in pkg/server/assignment_service.go
.
func (server *AssignmentServiceServer) Assign(ctx context.Context, request *pb.AssignmentRequest) (*pb.AssignmentResponse, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/challenge/assignment/service/ChallengeAssignmentService.java
.
@Override
public void assign(AssignmentRequest request, StreamObserver<AssignmentResponse> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/challenge_assignment.py
.
async def Assign(
self, request: AssignmentRequest, context: ServicerContext
) -> AssignmentResponse:
...
You could find more information about gRPC request handling here.