From f6d2ac2db41d0ddac9cc657f181eabe712bea2e8 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 17 Apr 2016 13:20:26 +0800 Subject: [PATCH] [ci skip] update google doc. Signed-off-by: Bo-Yi Wu --- doc.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/doc.go b/doc.go index a3d6457..2c60edc 100644 --- a/doc.go +++ b/doc.go @@ -11,6 +11,9 @@ // Support Web API to send push notification. // Support zero downtime restarts for go servers using endless. // Support HTTP/2 or HTTP/1.1 protocol. +// Support notification queue and multiple workers. +// Support /api/stat/app show notification success and failure counts. +// Support /api/config show your yml config. // // The pre-compiled binaries can be downloaded from release page. // @@ -26,6 +29,45 @@ // // $ gorush -ios -m="your message" -i="API Key" -t="Device token" -production // +// Run gorush web server +// +// $ gorush -c config.yml +// +// Get go status of api server using httpie tool: +// +// $ http -v --verify=no --json GET https://localhost:8088/api/stat/go +// +// Gorush support the following API. +// +// GET /api/stat/go Golang cpu, memory, gc, etc information. Thanks for golang-stats-api-handler. +// GET /api/stat/app show notification success and failure counts. +// GET /api/config show server yml config file. +// POST /api/push push ios and android notifications. +// +// Simple send iOS notification example, the platform value is 1: +// +// { +// "notifications": [ +// { +// "tokens": ["token_a", "token_b"], +// "platform": 1, +// "message": "Hello World iOS!" +// } +// ] +// } +// +// Simple send Android notification example, the platform value is 2: +// +// { +// "notifications": [ +// { +// "tokens": ["token_a", "token_b"], +// "platform": 2, +// "message": "Hello World Android!" +// } +// ] +// } +// // For more details, see the documentation and example. // package main