updated slapapi

This commit is contained in:
2026-02-21 14:45:14 +11:00
parent b07c486421
commit 2fee14680a
9 changed files with 597 additions and 19 deletions

View File

@@ -2,7 +2,6 @@ package slapshotapi
import (
"context"
"encoding/json"
"fmt"
"github.com/pkg/errors"
@@ -54,9 +53,11 @@ func (c *SlapAPI) GetQueueStatus(
endpoint := getEndpointMatchmaking(regions)
data, err := c.request(ctx, endpoint)
if err != nil {
return nil, errors.Wrap(err, "slapapiReq")
return nil, errors.Wrap(err, "c.request")
}
resp, err := unmarshal[matchmakingresp](data)
if err != nil {
return nil, errors.Wrap(err, "unmarshal")
}
resp := matchmakingresp{}
json.Unmarshal(data, &resp)
return &resp.Playlists, nil
}