feat: add Apps endpoint and query parameter support
- add `Apps` endpoint to the `Client` struct and initialize it in `NewClient` - implement `doWithJsonResponse` helper to handle request execution and JSON decoding in one step - update `newRequest` to support passing and encoding query parameters via `net/url` - rename `Option` to `ClientOption` for better clarity in the `NewClient` signature - refactor `Ping` tests to use a more structured nested layout - remove `option.go` and `option_test.go` as part of the configuration refactor
This commit is contained in:
@@ -36,7 +36,7 @@ type PingEndpoint struct {
|
||||
// log.Fatal("Ping failed:", err)
|
||||
// }
|
||||
func (p *PingEndpoint) Get(ctx context.Context) error {
|
||||
req, err := p.client.newRequest(ctx, http.MethodGet, pingPath, nil)
|
||||
req, err := p.client.newRequest(ctx, http.MethodGet, pingPath, nil, nil)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user