Skip to content
/ youdu Public

πŸš€ Youdu SDK is a Go package that provides API implementation related to Youdu IM

License

Notifications You must be signed in to change notification settings

addcnos/youdu

Folders and files

NameName
Last commit message
Last commit date
Mar 25, 2025
Sep 5, 2022
Sep 5, 2022
Sep 5, 2022
Aug 3, 2023
Mar 25, 2025
Sep 5, 2022
Mar 25, 2025
Mar 26, 2024
Nov 26, 2024
Mar 26, 2024
Nov 26, 2024
Aug 3, 2023
Dec 29, 2023
Nov 26, 2024
Nov 26, 2024
Mar 26, 2024
Nov 26, 2024
Aug 3, 2023
Sep 5, 2022
Mar 25, 2025
Mar 26, 2024
Dec 15, 2024
Mar 25, 2025
Mar 25, 2025
Mar 25, 2025
Nov 6, 2023
Mar 26, 2024
Mar 26, 2024
Mar 26, 2024

Repository files navigation

Youdu Go SDK

Lint GoDoc Go Report Card Language MIT license

πŸš€ Youdu SDK is a Go package that provides API implementation related to Youdu IM

Getting Started

Features

Installation

go get github.com/addcnos/youdu/v2

Usage

Please refer to the Documentation

package main

import (
	"context"
	"fmt"
	"net/http"
	"time"

	"github.com/addcnos/youdu/v2"
)

func main() {
	client := youdu.NewClient(&youdu.Config{
		Addr:   "http://examaple",
		Buin:   111222333,
		AppID:  "111222333",
		AesKey: "111333445",
	}, youdu.WithHTTPClient(&http.Client{
		Timeout: 3 * time.Second,
	}))

	resp, err := client.SendTextMessage(context.Background(), youdu.TextMessageRequest{
		ToUser:  "11111",
		MsgType: youdu.MsgTypeText,
		Text: youdu.MessageText{
			Content: "hello",
		},
	})
	if err != nil {
		panic(err)
	}

	fmt.Println(resp)
}

Contributing

Very welcome to join us! Raise an Issue or submit a Pull Request.

License

MIT License Β© 2022-2023 addcnos