Skip to content

Commit

Permalink
Merge pull request #6 from square/fern-bot/readme-fix
Browse files Browse the repository at this point in the history
🌿 Fix README.md formatting
  • Loading branch information
mikekono authored Nov 22, 2024
2 parents a88eadc + 319812a commit 4728b0e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Square Go Library

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
[![go shield](https://img.shields.io/badge/go-docs-blue)](https://pkg.go.dev/github.com/fern-demo/square-go-sdk)
[![go shield](https://img.shields.io/badge/go-docs-blue)](https://pkg.go.dev/github.com/square/square-go-sdk)

The Square Go library provides convenient access to the Square API from Go.

Expand All @@ -14,16 +14,16 @@ This module requires Go version >= 1.18.
Run the following command to use the Square Go library in your module:

```sh
go get github.com/fern-demo/square-go-sdk
go get github.com/square/square-go-sdk
```

## Usage

```go
import (
"github.com/fern-demo/square-go-sdk"
squareclient "github.com/fern-demo/square-go-sdk/client"
"github.com/fern-demo/square-go-sdk/option"
"github.com/square/square-go-sdk"
squareclient "github.com/square/square-go-sdk/client"
"github.com/square/square-go-sdk/option"
)

client := squareclient.NewClient(
Expand Down Expand Up @@ -65,7 +65,7 @@ For example, consider the `client.Payments.List` endpoint usage below:
response, err := client.Payments.List(
context.TODO(),
&square.PaymentsListRequest{
Total: square.Int64(100),
Total: square.Int64(100),
},
)
```
Expand All @@ -78,7 +78,7 @@ List endpoints are paginated. The SDK provides an iterator so that you can simpl
page, err := client.Payments.List(
context.TODO(),
&square.PaymentsListRequest{
Total: square.Int64(100),
Total: square.Int64(100),
},
)
if err != nil {
Expand Down Expand Up @@ -124,7 +124,7 @@ defer cancel()
response, err := client.Payments.List(
ctx,
&square.PaymentsListRequest{
Total: square.Int64(100),
Total: square.Int64(100),
},
)
```
Expand Down Expand Up @@ -217,7 +217,7 @@ request (shown above), or for an individual request like so:
response, err := client.Payments.List(
ctx,
&square.PaymentsListRequest{
Total: square.Int64(100),
Total: square.Int64(100),
},
option.WithToken("<YOUR_API_KEY>"),
)
Expand Down Expand Up @@ -293,7 +293,7 @@ This can be done for an individual request, too:
response, err := client.Payments.List(
context.TODO(),
&square.PaymentsListRequest{
Total: square.Int64(100),
Total: square.Int64(100),
},
option.WithMaxAttempts(1),
)
Expand Down

0 comments on commit 4728b0e

Please sign in to comment.