Skip to content

Commit

Permalink
Merge pull request #3 from tonicpow/feature/v1
Browse files Browse the repository at this point in the history
Repo rename udpate
  • Loading branch information
mrz1836 authored Dec 26, 2019
2 parents 144154c + 41def8d commit 0eda40d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

custom: https://tonicpow.com/?af=tonicpow-go
custom: https://tonicpow.com/?af=go-tonicpow
4 changes: 2 additions & 2 deletions CODE_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The package [golint](https://github.com/golang/lint) differs from [gofmt](https:
How to install [golint](https://github.com/golang/lint):
```bash
$ go get -u golang.org/x/lint/golint
$ cd ../tonicpow-go
$ cd ../go-tonicpow
$ golint
```

Expand All @@ -29,7 +29,7 @@ $ golint

How to run [vet](https://golang.org/cmd/vet/):
```bash
$ cd ../tonicpow-go
$ cd ../go-tonicpow
$ go vet -v
```

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ This project follows [effective Go standards](https://golang.org/doc/effective_g
- [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc)
- [golint](https://github.com/golang/lint)
- [vet](https://golang.org/cmd/vet/)
- [GoReportCard.com](https://goreportcard.com/report/github.com/tonicpow/tonicpow-go)
- [GoReportCard.com](https://goreportcard.com/report/github.com/tonicpow/go-tonicpow)
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# tonicpow-go
**tonicpow-go** is the official golang implementation for interacting with the TonicPow API
# go-tonicpow
**go-tonicpow** is the official golang implementation for interacting with the TonicPow API

[![Build Status](https://travis-ci.com/tonicpow/tonicpow-go.svg?branch=master)](https://travis-ci.com/tonicpow/tonicpow-go)
[![Report](https://goreportcard.com/badge/github.com/tonicpow/tonicpow-go?style=flat)](https://goreportcard.com/report/github.com/tonicpow/tonicpow-go)
[![Release](https://img.shields.io/github/release-pre/tonicpow/tonicpow-go.svg?style=flat)](https://github.com/tonicpow/tonicpow-go/releases)
[![Build Status](https://travis-ci.com/tonicpow/go-tonicpow.svg?branch=master)](https://travis-ci.com/tonicpow/go-tonicpow)
[![Report](https://goreportcard.com/badge/github.com/tonicpow/go-tonicpow?style=flat)](https://goreportcard.com/report/github.com/tonicpow/go-tonicpow)
[![Release](https://img.shields.io/github/release-pre/tonicpow/go-tonicpow.svg?style=flat)](https://github.com/tonicpow/go-tonicpow/releases)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat)](https://github.com/RichardLitt/standard-readme)
[![GoDoc](https://godoc.org/github.com/tonicpow/tonicpow-go?status.svg&style=flat)](https://godoc.org/github.com/tonicpow/tonicpow-go)
[![GoDoc](https://godoc.org/github.com/tonicpow/go-tonicpow?status.svg&style=flat)](https://godoc.org/github.com/tonicpow/go-tonicpow)

## Table of Contents
- [Installation](#installation)
Expand All @@ -20,13 +20,13 @@

## Installation

**tonicpow-go** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).
**go-tonicpow** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).
```bash
$ go get -u github.com/tonicpow/tonicpow-go
$ go get -u github.com/tonicpow/go-tonicpow
```

## Documentation
You can view the generated [documentation here](https://godoc.org/github.com/tonicpow/tonicpow-go).
You can view the generated [documentation here](https://godoc.org/github.com/tonicpow/go-tonicpow).

### Features
- Complete coverage for the [TonicPow.com](https://tonicpow.com/) API
Expand All @@ -35,24 +35,24 @@ You can view the generated [documentation here](https://godoc.org/github.com/ton
- Using [heimdall http client](https://github.com/gojek/heimdall) with exponential backoff & more

## Examples & Tests
All unit tests and [examples](tonicpow_test.go) run via [Travis CI](https://travis-ci.org/tonicpow/tonicpow-go) and uses [Go version 1.13.x](https://golang.org/doc/go1.13). View the [deployment configuration file](.travis.yml).
All unit tests and [examples](tonicpow_test.go) run via [Travis CI](https://travis-ci.org/tonicpow/go-tonicpow) and uses [Go version 1.13.x](https://golang.org/doc/go1.13). View the [deployment configuration file](.travis.yml).

Run all tests (including integration tests)
```bash
$ cd ../tonicpow-go
$ cd ../go-tonicpow
$ go test ./... -v
```

Run tests (excluding integration tests)
```bash
$ cd ../tonicpow-go
$ cd ../go-tonicpow
$ go test ./... -v -test.short
```

## Benchmarks
Run the Go [benchmarks](tonicpow_test.go):
```bash
$ cd ../tonicpow-go
$ cd ../go-tonicpow
$ go test -bench . -benchmem
```

Expand All @@ -67,7 +67,7 @@ Basic implementation:
package main

import (
"github.com/tonicpow/tonicpow-go"
"github.com/tonicpow/go-tonicpow"
)

func main() {
Expand All @@ -78,7 +78,7 @@ func main() {

## Maintainers

[@MrZ1836](https://github.com/mrz1836)
[@MrZ](https://github.com/mrz1836)

## Contributing

Expand All @@ -88,8 +88,8 @@ View the [contributing guidelines](CONTRIBUTING.md) and follow the [code of cond

Support the development of this project 🙏

[![Donate](https://img.shields.io/badge/donate-bitcoin-brightgreen.svg)](https://mrz1818.com/?tab=tips&af=tonicpow-go)
[![Donate](https://img.shields.io/badge/donate-bitcoin-brightgreen.svg)](https://mrz1818.com/?tab=tips&af=go-tonicpow)

## License

![License](https://img.shields.io/github/license/tonicpow/tonicpow-go.svg?style=flat)
![License](https://img.shields.io/github/license/tonicpow/go-tonicpow.svg?style=flat)
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/mrz1836/tonicpow-go
module github.com/tonicpow/go-tonicpow

go 1.13

Expand All @@ -7,4 +7,5 @@ require (
github.com/gojektech/heimdall v5.0.2+incompatible // indirect
github.com/gojektech/valkyrie v0.0.0-20190210220504-8f62c1e7ba45 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/stretchr/testify v1.4.0 // indirect
)
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gojek/heimdall v5.0.2+incompatible h1:S9IJNuRErtH5MZ7Aps10haoTAoxy9Q0E0bYIjJZT7Vg=
github.com/gojek/heimdall v5.0.2+incompatible/go.mod h1:caFYHVXyKSrgUJgtgHM+KJZGyI1wWxghxu7aFPLVfI8=
github.com/gojektech/heimdall v5.0.2+incompatible h1:mfGLnHNTKN7b1OMTO4ZvL3oT2P13kqTTV7owK7BZDck=
Expand All @@ -6,3 +8,12 @@ github.com/gojektech/valkyrie v0.0.0-20190210220504-8f62c1e7ba45 h1:MO2DsGCZz8ph
github.com/gojektech/valkyrie v0.0.0-20190210220504-8f62c1e7ba45/go.mod h1:tDYRk1s5Pms6XJjj5m2PxAzmQvaDU8GqDf1u6x7yxKw=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
7 changes: 3 additions & 4 deletions tonicpow.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type RequestParameters struct {
UserAgent string
}

// LastRequest is used to track what was submitted to whatsonchain on the Request()
// LastRequest is used to track what was submitted via the Request()
type LastRequest struct {

// Method is either POST or GET
Expand All @@ -63,7 +63,7 @@ type LastRequest struct {
// NewClient creates a new client to submit queries with.
// Parameters values are set to the defaults defined by TonicPow.
//
// For more information: https://tonicpow.com
// For more information: https://docs.tonicpow.com
func NewClient(advertiserSecretKey string) (c *Client, err error) {

// Create a client
Expand Down Expand Up @@ -213,8 +213,7 @@ func (c *Client) ConvertGoal(goalName string, sessionTxID string, userID string,

// Fire the request
var resp string
resp, err = c.Request("conversions", "POST", &postData)
if err != nil {
if resp, err = c.Request("conversions", "POST", &postData); err != nil {
return
}

Expand Down

0 comments on commit 0eda40d

Please sign in to comment.