Skip to content

zhuweijava/apnsapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wercker status

apnsapi

require go1.6

Simple apns api (http/2) client fo golang.

USAGE

It provides only client, so should setup http/2 client, apns payload yourself.

token := "..."
client := apnsapi.NewClient(apnsapi.ProductionServer, &http.Client{...})
header := &apnsapi.Header{ApnsTopic: "..."}
payload := `{ "aps" : { "alert" : "hi" } }`
if _, err = client.Do(token, header, []byte{payload}); err != nil {
    ...
}

_example/main.go is sample implantation and used like this.

$ go run _example/main.go --p12 /path/to/file.p12 --topic $topic --token $token

SEE ALSO

LICENSE

MIT

About

Simple apns api (http/2) client fo golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%