add content subcommand
This commit is contained in:
1 parent
cc59c2bfc8
commit
3c4f51e94d
2 files changed
+70
No files matched your search
@@ -38,6 +38,10 @@ func RequestDiffPatch(gamePk, startTimecode, pushUpdateId string) (DiffPatchResp
|
||||
return DefaultClient.RequestDiffPatch(gamePk, startTimecode, pushUpdateId)
|
||||
}
|
||||
|
||||
func RequestContent(gamePk string) ([]byte, error) {
|
||||
return DefaultClient.RequestContent(gamePk)
|
||||
}
|
||||
|
||||
type DiffPatchResponse []byte
|
||||
|
||||
type Client struct {
|
||||
@@ -98,6 +102,11 @@ func (c *Client) RequestDiffPatch(gamePk, startTimecode, pushUpdateId string) (D
|
||||
return c.get(&endpoint)
|
||||
}
|
||||
|
||||
func (c *Client) RequestContent(gamePk string) ([]byte, error) {
|
||||
endpoint := url.URL{Path: "api/v1/game/" + gamePk + "/content"}
|
||||
return c.get(&endpoint)
|
||||
}
|
||||
|
||||
func (c *Client) get(endpoint *url.URL) ([]byte, error) {
|
||||
url := c.baseURL.ResolveReference(endpoint)
|
||||
|
||||
|
||||
Reference in new issue
Block a user