github.com/fluidcoins/thepeer
go get github.com/fluidcoins/thepeer

github.com/fluidcoins/thepeer

ThePeer SDK ( Go )

by fluidcoins

v0.0.0-20210801161853-7df0a86a0093 (see all)License:MIT
go get github.com/fluidcoins/thepeer
Readme

thepeer

ThePeer SDK ( Go )

Installation

go get github.com/fluidcoins/thepeer

Usage

    c,err := New(WithAPISecret("API_KEY"))
    // check error
    // Also you can pass in your own *http.Client as follows
    // New(WithAPISecret("API_KEY"), WithHTTPClient(httpClient))
    // Although, you have to make sure the provided client is authenticated with your api key
    opts := &IndexUserOptions{
        Name:       randomdata.FullName(randomdata.RandomGender),
        Email:      randomdata.Email(),
        Identifier: randomdata.StringNumber(10, ""),
    }

    idxUser, err := c.IndexUser(opts)

    newIdxUser, err = c.UpdateUser(&UpdateUserOptions{
        Identifier: randomdata.StringNumber(10, ""),
        Reference:  idxUser.Reference,
    })
    require.NoError(t, err)
    require.NotEqual(t, idxUser.Identifier, newIdxUser.Identifier)

    c.DeleteUser(&DeIndexUserOptions{
        UserReference: idxUser.Reference,
    })


Status

  • Index user
  • Delete user
  • Update user
  • Fetch a send receipt
  • Process a send receipt

GitHub Stars

12

LAST COMMIT

10mos ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20210801161853-7df0a86a0093
10mos ago
v0.0.0-20210626145024-792d4ccc3d88
1yr ago
No alternatives found
No tutorials found
Add a tutorial