This repository has been archived by the owner on Oct 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Feature/uri activity #5
Open
jukylin
wants to merge
8
commits into
DeanThompson:master
Choose a base branch
from
jukylin:feature/uri_activity
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
77daace
返回错误信息添加msg_id
jky-yy dd8ab77
rename to jukylin by zjh
jky-yy 25b2e34
安卓新特性
jky-yy a735276
ios10推送特性
jky-yy 3478aa1
ios10推送特性
jky-yy 35edc9d
ios10推送特性
jky-yy 2d305f0
remove fmt
jky-yy bf481cd
ios副标
jky-yy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
*.prof | ||
api.push | ||
lastupdate.tmp | ||
*.tar.gz | ||
.com.apple* | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
JPush API Go Client | ||
==================== | ||
|
||
[![GoDoc](https://godoc.org/github.com/DeanThompson/jpush-api-go-client?status.svg)](https://godoc.org/github.com/DeanThompson/jpush-api-go-client) [![Build Status](https://travis-ci.org/DeanThompson/jpush-api-go-client.svg?branch=master)](https://travis-ci.org/DeanThompson/jpush-api-go-client) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 如果要 merge 进来,请把文档地址恢复到 github.com/DeanThompson, 下同 |
||
[![GoDoc](https://godoc.org/github.com/Aqiling/jpush-api-go-client?status.svg)](https://godoc.org/github.com/Aqiling/jpush-api-go-client) [![Build Status](https://travis-ci.org/Aqiling/jpush-api-go-client.svg?branch=master)](https://travis-ci.org/Aqiling/jpush-api-go-client) | ||
|
||
# 概述 | ||
|
||
|
@@ -14,15 +14,15 @@ JPush API Go Client | |
使用 go get 安装,无任何第三方依赖: | ||
|
||
```sh | ||
go get github.com/DeanThompson/jpush-api-go-client | ||
go get github.com/Aqiling/jpush-api-go-client | ||
``` | ||
|
||
# 使用方法 | ||
|
||
## 1. 创建 JPushClient | ||
|
||
```go | ||
import "github.com/DeanThompson/jpush-api-go-client" | ||
import "github.com/Aqiling/jpush-api-go-client" | ||
|
||
const ( | ||
appKey = "" | ||
|
@@ -37,7 +37,7 @@ jclient := jpush.NewJPushClient(appKey, masterSecret) | |
与推送有关的数据结构都在 push 包里 | ||
|
||
```go | ||
import "github.com/DeanThompson/jpush-api-go-client/push" | ||
import "github.com/Aqiling/jpush-api-go-client/push" | ||
``` | ||
|
||
### 2.1 创建 Platform 对象 | ||
|
@@ -187,4 +187,5 @@ if err != nil { | |
|
||
## 4. 更多示例 | ||
|
||
|
||
更多例子可以看这里:[jpush_test.go](jpush_test.go) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import ( | |
"fmt" | ||
"net/http" | ||
|
||
"github.com/DeanThompson/jpush-api-go-client/common" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 请修复 import 地址,下同 |
||
"github.com/jukylin/jpush-api-go-client/common" | ||
) | ||
|
||
type GetAliasUsersResult struct { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ package push | |
import ( | ||
"encoding/json" | ||
|
||
"github.com/DeanThompson/jpush-api-go-client/common" | ||
"github.com/jukylin/jpush-api-go-client/common" | ||
) | ||
|
||
// “通知”对象,是一条推送的实体内容对象之一(另一个是“消息”) | ||
|
@@ -27,7 +27,7 @@ func (n *Notification) Validate() error { | |
|
||
// 平台通用的通知属性 | ||
type platformNotification struct { | ||
Alert string `json:"alert"` // required | ||
Alert interface{} `json:"alert"` // required | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 改了 |
||
Extras map[string]interface{} `json:"extras,omitempty"` | ||
} | ||
|
||
|
@@ -44,6 +44,10 @@ type AndroidNotification struct { | |
|
||
Title string `json:"title,omitempty"` | ||
BuilderId int `json:"builder_id,omitempty"` | ||
Style int `json:"style,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 提交代码前请执行 gofmt |
||
BigText string `json:"big_text,omitempty"` | ||
Inbox string `json:"inbox,omitempty"` | ||
BigPicPath string `json:"big_pic_path,omitempty"` | ||
} | ||
|
||
func NewAndroidNotification(alert string) *AndroidNotification { | ||
|
@@ -60,9 +64,10 @@ type IosNotification struct { | |
Badge int `json:"badge,omitempty"` | ||
ContentAvailable bool `json:"content-available,omitempty"` | ||
Category string `json:"category,omitempty"` | ||
MutableContent bool `json:"mutable-content,omitempty"` | ||
} | ||
|
||
func NewIosNotification(alert string) *IosNotification { | ||
func NewIosNotification(alert map[string]string) *IosNotification { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 改了函数签名,需要测试 |
||
a := &IosNotification{} | ||
a.Alert = alert | ||
return a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新增的 ignore 规则,请添加到末尾,保留原来的规则