github.com/moon-planet/solapi-go

SOLAPI SDK for Go


Install
go get github.com/moon-planet/solapi-go

Documentation

solapi-go

Site | Docs | Examples |

๋ฌธ์ž ๋ฉ”์‹œ์ง€ ๋ฐœ์†ก ๋ฐ ์กฐํšŒ ๊ด€๋ จ ๊ธฐ๋Šฅ๋“ค์„ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•˜์‹ค ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์ง„ SDK ์ž…๋‹ˆ๋‹ค.

Example

require (
        github.com/solapi/solapi-go
)

func main() {
	client := solapi.NewClient()

	// Message Data
	// ๊ด€๋ จ ํŒŒ๋ผ๋ฏธํ„ฐ๋“ค์€ https://docs.solapi.com์—์„œ ํ™•์ธ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
	message := make(map[string]interface{})
	message["to"] = "01000000000"
	message["from"] = "029302266"
	message["text"] = "Test Message"
	message["type"] = "SMS"

	params := make(map[string]interface{})
	params["message"] = message

	// Call API Resource
	result, err := client.Message.SendSimpleMessage(params)
	if err != nil {
		fmt.Println(err)
	}
}

examples folder์—์„œ ์ž์„ธํ•œ ์˜ˆ์ œํŒŒ์ผ๋“ค์„ ํ™•์ธํ•˜์„ธ์š”.

Installation

go get github.com/moon-planet/solapi-go

Configs

> OS์˜ ํ™˜๊ฒฝ์„ค์ • ๊ธฐ๋ฐ˜์œผ๋กœ ๊ฐ’์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
SOLAPI_API_KEY=
SOLAPI_API_SECRET=
SOLAPI_PROTOCOL=https
SOLAPI_DOMAIN=api.solapi.com
SOLAPI_PREFIX=
SOLAPI_APP_ID=