-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from itsksaurabh/go/doc
add doc.go
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
Package wazirx provides a client for using the Wazirx's Public Rest API. | ||
You can read the API server documentation at https://github.com/WazirX/wazirx-api | ||
Usage: | ||
create a new instance of Client, then use the various methods on the client to access different parts of the API. | ||
For demonstration: | ||
package main | ||
import ( | ||
"context" | ||
"fmt" | ||
"log" | ||
"github.com/itsksaurabh/go-wazirx" | ||
) | ||
func main() { | ||
client := wazirx.Client{} | ||
ctx := context.Background() | ||
data, err := client.MarketStatus(ctx) | ||
if err != nil { | ||
log.Fatal("request failed:", err) | ||
} | ||
fmt.Println(data) | ||
} | ||
Notes: | ||
* Using the [https://godoc.org/context](https://godoc.org/context) package for passing context. | ||
* Look at tests(*_test.go) files for more sample usage. | ||
*/ | ||
package wazirx |