-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maxapi: simplify ticker response parsing
- Loading branch information
Showing
6 changed files
with
212 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package max | ||
|
||
import ( | ||
"github.com/c9s/requestgen" | ||
) | ||
|
||
//go:generate -command GetRequest requestgen -method GET | ||
//go:generate -command PostRequest requestgen -method POST | ||
//go:generate -command DeleteRequest requestgen -method DELETE | ||
|
||
//go:generate GetRequest -url "/api/v2/tickers/:market" -type GetTickerRequest -responseType .Ticker | ||
type GetTickerRequest struct { | ||
client requestgen.APIClient | ||
|
||
market *string `param:"market,slug"` | ||
} | ||
|
||
func (c *RestClient) NewGetTickerRequest() *GetTickerRequest { | ||
return &GetTickerRequest{client: c} | ||
} |
154 changes: 154 additions & 0 deletions
154
pkg/exchange/max/maxapi/get_ticker_request_requestgen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters