add content subcommand
This commit is contained in:
@@ -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