Baidu Cloud Push Send--go language Realization class Library

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

#快速开始

# # #下载安装

go get github.com/mnhkahn/BaiduYunPush

# # #创建文件pushtest. Go

package mainimport (    "fmt"    "github.com/mnhkahn/BaiduYunPush")var apikey = "**************************"var seckey = "******************************"var method = "POST"var url_base1 = "channel.api.duapp.com/rest/2.0/channel/channel"func main() {    push := BaiduYunPush.New(apikey, seckey)    s, err := push.Push("推送成功", "这是我的个人博客blog.cyeam.com")    fmt.Println(s, err)}

# # #编译运行

go run pushtest.go

When true the console is displayed, the push succeeds. At this point, the device that is bound by the SDK displays the push message.

Reference documents

    • "1" Baidu Open cloud Document

The original link: Baidu Cloud push send--go language Realization class library, reprint please indicate source!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.