Skip to content

khoa-le/fomo-go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fomo-go-sdk

Introduction

Golang client for Fomo API.

Install

Install with go get:

$ go get github.com/khoa-le/fomo-go-sdk

Usage

package main

import (
    "fmt"
    "os"

    "github.com/khoa-le/fomo-go-sdk"
)

const (
    apiKey = "oH123EKegQRG-6HvX4pT_X"
)
func main() {
	response := new(interface{})
	client := fomo.New(apiKey)
	attributes := map[string]string{"count": "200"}
	event := fomo.EventBasic{
		EventTypeId: 122413,
		Url:         "https://precita.vn/customer/account/create/",
		Title:       "Precita",
		Attributes:  attributes,
	}
	body := make(map[string]fomo.EventBasic)
	body["event"] = event
	err := client.Request("POST", "/api/v1/applications/me/events", nil, body, response)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Print(response)
}

About

Golang package for Fomo API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages