Skip to content

Commit

Permalink
Added new referral url and id fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jan 23, 2020
1 parent c505eb7 commit 3c2c254
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ type User struct {
PayoutAddress string `json:"payout_address,omitempty"`
Phone string `json:"phone,omitempty"`
PhoneVerified bool `json:"phone_verified,omitempty"`
ReferralLinkID uint64 `json:"referral_link_id,omitempty"`
ReferralURL string `json:"referral_url,omitempty"`
ReferredByUserID uint64 `json:"referred_by_user_id,omitempty"`
Status string `json:"status,omitempty"`
TncpwSession string `json:"tncpw_session,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion examples/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func main() {
if user, err = TonicPowAPI.CreateUser(user); err != nil {
log.Fatalf("create user failed error %s - api error: %s data: %s", err.Error(), TonicPowAPI.LastRequest.Error.Message, TonicPowAPI.LastRequest.Error.Data)
} else {
log.Printf("user %d created", user.ID)
log.Printf("user %d created - referral url %s", user.ID, user.ReferralURL)
}

//
Expand Down
2 changes: 2 additions & 0 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ func (u *User) permitFields() {
u.Earned = 0
u.InternalAddress = ""
u.Status = ""
u.ReferralLinkID = 0
u.ReferralURL = ""
}

// CreateUser will make a new user
Expand Down

0 comments on commit 3c2c254

Please sign in to comment.