You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apiCmd.PersistentFlags().BoolVarP(&prettyPrint, "unformatted", "u", false, "Whether to have API requests come back unformatted/non-prettyprinted. Default is false.")
75
+
76
+
getCmd.PersistentFlags().BoolVarP(&autoPaginate, "autopaginate", "P", false, "Whether to have API requests automatically paginate. Default is false.")
|`--query-param`|`-q`| Query parameters for the endpoint in `key=value` format. Multiple can be entered to give multiple parameters. |`get -q login=ninja`| N |
35
-
|`--unformatted`|`-u`| Whether to return unformatted responses. Default is `false`. |`get -u`| N |
32
+
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|`--query-param`|`-q`| Query parameters for the endpoint in `key=value` format. Multiple can be entered to give multiple parameters. |`get -q login=ninja`| N |
35
+
|`--unformatted`|`-u`| Whether to return unformatted responses. Default is `false`. |`get -u`| N |
36
+
|`--autopaginate`|`-P`| Whether to autopaginate the response from Twitch **WARNING** This flag can cause extremely large payloads and cause issues with some terminals. Default is `false`. |`get -P`| N |
@@ -29,7 +30,11 @@ type clientInformation struct {
29
30
}
30
31
31
32
// NewRequest is used to request data from the Twitch API using a HTTP GET request- this function is a wrapper for the apiRequest function that handles the network call
32
-
funcNewRequest(methodstring, pathstring, queryParameters []string, body []byte, prettyPrintbool) {
33
+
funcNewRequest(methodstring, pathstring, queryParameters []string, body []byte, prettyPrintbool, autopaginatebool) {
0 commit comments