n10ty / iaphub-go

Non-official Go client for Iaphub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Iaphub-go

iaphub-go is an unofficial Go client for iaphub.com REST API.

Go Report Card GoDoc Build

Installation

go get github.com/n10ty/iaphub-go

Usage

package main

import (
	"fmt"
	"github.com/n10ty/iaphub-go"
)

func main() {
    
        iaphubSecret := <Your secret>
        iaphubAppId := <Your app id>

	c, err := iaphub.NewClient(iaphubSecret, iaphubAppId)
	if err != nil {
		fmt.Println(err)
		return
	}
	
	userRequest := iaphub.GetUserRequest{
		UserId:   userid,
		Platform: iaphub.PlatformIOS,
	}
	user, err := c.GetUser(getuser)
    
        if err != nil {
            fmt.Println(err)
            return
	}
	fmt.Println(user)
}

Custom environment

c, err := iaphub.NewClient(iaphubSecret, iaphubAppId, iaphub.UseEnv("sandbox"))

Supported methods

  • Get user
  • Get user migrate
  • Post user
  • Post user receipt
  • Get purchase
  • Get purchases
  • Get subscription
  • Get receipt

License

MIT License

About

Non-official Go client for Iaphub

License:MIT License


Languages

Language:Go 100.0%