Skip to content

alainfonhof/OmiseGo-Go-SDK

Repository files navigation

Godoc

Go client for OmiseGo eWallet and Admin API

Go client for all eWallet Admin API endpoints OmiseGo. It has been updated for v1.0 of the OMG eWallet (commit 6c1aca9). Keep in mind that the tests aren't done yet. Feedback is warmly welcomed.

Getting started

go get github.com/Alainy/OmiseGo-Go-SDK

import (
  omg "github.com/Alainy/OmiseGo-Go-SDK"
  "net/url"
)

func main(){
  // Create a client
  adminURL := &url.URL{
    Scheme: "http",
    Host:   "localhost:4000",
    Path:   "/api/admin",
  }
  c, _ := omg.NewClient("your-accessKey", "your-secretKey", adminURL)
  adminClient := omg.AdminAPI{
    Client: c,
  }

  // Lets create a new user
  userBody := omg.UserParams{
    ProviderUserId: "provider_id",
    Username:       "good_username",
    Metadata: map[string]interface{}{
      "first_name": "Henk",
      "last_name":  "Beckwith",
    },
  }

  user, err := adminClient.UserCreate(userBody)
}

Coverage

Admin API

  • /admin.login
  • /me.logout
  • /auth_token.switch_account
  • /admin.reset_password
  • /admin.update_password
  • /admin.all
  • /admin.get
  • /invite.accept
  • /me.get
  • /me.update
  • /me.upload_avatar
  • /me.get_account
  • /me.get_accounts
  • /user.login
  • /user.logout
  • /user.all
  • /user.create
  • /user.update
  • /user.get
  • /user.get_wallets
  • /user.get_transactions
  • /user.get_transaction_consumptions
  • /token.all
  • /token.get
  • /token.create
  • /token.update
  • /token.stats
  • /token.get_mints
  • /token.mint
  • /exchange_pair.all
  • /exchange_pair.get
  • /exchange_pair.create
  • /exchange_pair.update
  • /exchange_pair.delete
  • /category.all
  • /category.get
  • /category.create
  • /category.update
  • /category.delete
  • /account.all
  • /account.get
  • /account.create
  • /account.update
  • /account.upload_avatar
  • /account.assign_user
  • /account.unassign_user
  • /account.get_members
  • /account.get_users
  • /account.get_descendants
  • /account.get_wallets
  • /account.get_transactions
  • /account.get_transaction_requests
  • /account.get_transaction_consumptions
  • /wallet.all
  • /wallet.get
  • /wallet.create
  • /wallet.get_transaction_consumptions
  • /transaction.all
  • /transaction.get
  • /transaction.create
  • /transaction.calculate
  • /transaction_request.all
  • /transaction_request.get
  • /transaction_request.create_request
  • /transaction_request.consume
  • /transaction_request.get_transaction_consumptions
  • /transaction_consumption.all
  • /transaction_consumption.get
  • /transaction_consumption.approve
  • /transaction_consumption.reject
  • /access_key.all
  • /access_key.create
  • /access_key.update
  • /access_key.delete
  • /api_key.all
  • /api_key.create
  • /api_key.update
  • /api_key.delete
  • /settings.all

EWallet API

  • /me.logout
  • /me.get
  • /me.get_wallets
  • /me.get_transactions
  • /me.create_transaction
  • /me.create_transaction_request
  • /me.get_transaction_request
  • /me.consume_transaction_request
  • /me.approve_transaction_consumption
  • /me.reject_transaction_consumption
  • /me.get_settings

About

GoLang client for OmiseGo eWallet and Admin API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages