ampedxx-wechat-protocal 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +50 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bin/console +17 -0
- data/bin/setup +8 -0
- data/lib/protocals/wechat.proto +117 -0
- data/lib/wechat/protocal.rb +7 -0
- data/lib/wechat/protocal/version.rb +5 -0
- data/lib/wechat_pb.rb +74 -0
- data/lib/wechat_services_pb.rb +47 -0
- data/wechat-protocal.gemspec +27 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 550fa6b7bb6d140ac3d458710349dd00c7ff9f57
|
4
|
+
data.tar.gz: 6c4d12311dd61c7e2be748d2d743b4caac702671
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: daa0e4390805e7df3b9c3a2ef31870407786538fb887dbc2ead17584d08f8d42d53226014de5b6f2b673feebf450d6a172c7ab042151cf2d5f1715752a7dc83f
|
7
|
+
data.tar.gz: 9f84fe04b41ffbe61ab8d21ce6628fea0dcfa17e637cb04bae09112cc4b6d1b93c85ff26ed317a78aaaf63669998f4b6dd953355f1fe05b98e752bb201a039d4
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
10
|
+
#
|
11
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
12
|
+
# or operating system, you probably want to add a global ignore instead:
|
13
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
14
|
+
|
15
|
+
# Ignore bundler config.
|
16
|
+
/.bundle
|
17
|
+
|
18
|
+
# Ignore the default SQLite database.
|
19
|
+
/db/*.sqlite3
|
20
|
+
/db/*.sqlite3-journal
|
21
|
+
|
22
|
+
# Ignore all logfiles and tempfiles.
|
23
|
+
/log/*
|
24
|
+
/tmp/*
|
25
|
+
!/log/.keep
|
26
|
+
!/tmp/.keep
|
27
|
+
|
28
|
+
# Ignore Byebug command history file.
|
29
|
+
.byebug_history
|
30
|
+
|
31
|
+
.idea/
|
32
|
+
.Ds_Store
|
33
|
+
Gemfile.lock
|
34
|
+
config/database.yml
|
35
|
+
config/redis.yml
|
36
|
+
config/host.yml
|
37
|
+
config/carrierwave.yml
|
38
|
+
npm-debug.log
|
39
|
+
vendor/cache/*
|
40
|
+
public/assets.tgz
|
41
|
+
assets.tgz
|
42
|
+
public/assets/*
|
43
|
+
public/uploads/*
|
44
|
+
dump.rdb
|
45
|
+
id_rsa
|
46
|
+
jk-api-deployment.yaml
|
47
|
+
deployment.yaml
|
48
|
+
|
49
|
+
# rspec failure tracking
|
50
|
+
.rspec_status
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at 351711778@qq.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 icepoint0
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Wechat::Protocal
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/wechat/protocal`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'wechat-protocal'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install wechat-protocal
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wechat-protocal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Wechat::Protocal project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/wechat-protocal/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "wechat/protocal"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
15
|
+
|
16
|
+
#cmd
|
17
|
+
# grpc_tools_ruby_protoc -I ./lib/protocals --ruby_out=./lib --grpc_out=lib lib/protocals/*
|
data/bin/setup
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
// Copyright 2015 gRPC authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
option java_multiple_files = true;
|
18
|
+
option java_package = "io.grpc.examples.helloworld";
|
19
|
+
option java_outer_classname = "HelloWorldProto";
|
20
|
+
option objc_class_prefix = "HLW";
|
21
|
+
|
22
|
+
package atyun;
|
23
|
+
|
24
|
+
// The greeting service definition.
|
25
|
+
service wechat {
|
26
|
+
// Sends a greeting
|
27
|
+
rpc SayHello (HelloRequest) returns (HelloReply) {
|
28
|
+
}
|
29
|
+
|
30
|
+
// get wechat-subscription access_token
|
31
|
+
rpc GetSubscriptionAccessToken (GetAccesstokenRequest) returns (GetAccesstokenReply) {
|
32
|
+
}
|
33
|
+
|
34
|
+
// send wechat-subscription message
|
35
|
+
rpc SendWechatSubscriptionMessage (SendWechatMessageRequest) returns (SendWechatMessageReply) {
|
36
|
+
}
|
37
|
+
|
38
|
+
// wechat oauth
|
39
|
+
rpc WechatOauth (WechatOauthRequest) returns (WechatOauthReply) {
|
40
|
+
}
|
41
|
+
|
42
|
+
// wechat login
|
43
|
+
rpc WechatLogin (WechatLoginRequest) returns (WechatLoginReply) {
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
// The request message containing the user's name.
|
49
|
+
message HelloRequest {
|
50
|
+
string name = 1;
|
51
|
+
}
|
52
|
+
|
53
|
+
// The response message containing the greetings
|
54
|
+
message HelloReply {
|
55
|
+
Status status = 1;
|
56
|
+
}
|
57
|
+
|
58
|
+
message Status {
|
59
|
+
string message = 1;
|
60
|
+
string code = 2;
|
61
|
+
}
|
62
|
+
|
63
|
+
// appid && secret_key
|
64
|
+
message GetAccesstokenRequest {
|
65
|
+
string app_id = 1;
|
66
|
+
string secret_key = 2;
|
67
|
+
}
|
68
|
+
|
69
|
+
message GetAccesstokenReply {
|
70
|
+
Status status = 1;
|
71
|
+
string access_token = 2;
|
72
|
+
}
|
73
|
+
|
74
|
+
// send message to wechat-subscription users
|
75
|
+
message SendWechatMessageRequest {
|
76
|
+
string template_id = 1;
|
77
|
+
Keyword first = 2;
|
78
|
+
Keyword keyword1 = 3;
|
79
|
+
Keyword keyword2 = 4;
|
80
|
+
Keyword keyword3 = 5;
|
81
|
+
Keyword keyword4 = 6;
|
82
|
+
Keyword remark = 7;
|
83
|
+
string token = 8;
|
84
|
+
string direct_url = 10;
|
85
|
+
}
|
86
|
+
|
87
|
+
message SendWechatMessageReply {
|
88
|
+
string errcode = 1;
|
89
|
+
Status status = 2;
|
90
|
+
}
|
91
|
+
|
92
|
+
message Keyword {
|
93
|
+
string value = 1;
|
94
|
+
}
|
95
|
+
|
96
|
+
// WechatOauth
|
97
|
+
|
98
|
+
message WechatOauthRequest {
|
99
|
+
string uri = 1;
|
100
|
+
string origin = 2;
|
101
|
+
}
|
102
|
+
|
103
|
+
message WechatOauthReply {
|
104
|
+
string sns_url = 1;
|
105
|
+
Status status = 2;
|
106
|
+
}
|
107
|
+
|
108
|
+
message WechatLoginRequest {
|
109
|
+
string code = 3;
|
110
|
+
}
|
111
|
+
|
112
|
+
message WechatLoginReply {
|
113
|
+
string openid = 1;
|
114
|
+
string image_url = 2;
|
115
|
+
Status status = 3;
|
116
|
+
}
|
117
|
+
|
data/lib/wechat_pb.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: wechat.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "atyun.HelloRequest" do
|
8
|
+
optional :name, :string, 1
|
9
|
+
end
|
10
|
+
add_message "atyun.HelloReply" do
|
11
|
+
optional :status, :message, 1, "atyun.Status"
|
12
|
+
end
|
13
|
+
add_message "atyun.Status" do
|
14
|
+
optional :message, :string, 1
|
15
|
+
optional :code, :string, 2
|
16
|
+
end
|
17
|
+
add_message "atyun.GetAccesstokenRequest" do
|
18
|
+
optional :app_id, :string, 1
|
19
|
+
optional :secret_key, :string, 2
|
20
|
+
end
|
21
|
+
add_message "atyun.GetAccesstokenReply" do
|
22
|
+
optional :status, :message, 1, "atyun.Status"
|
23
|
+
optional :access_token, :string, 2
|
24
|
+
end
|
25
|
+
add_message "atyun.SendWechatMessageRequest" do
|
26
|
+
optional :template_id, :string, 1
|
27
|
+
optional :first, :message, 2, "atyun.Keyword"
|
28
|
+
optional :keyword1, :message, 3, "atyun.Keyword"
|
29
|
+
optional :keyword2, :message, 4, "atyun.Keyword"
|
30
|
+
optional :keyword3, :message, 5, "atyun.Keyword"
|
31
|
+
optional :keyword4, :message, 6, "atyun.Keyword"
|
32
|
+
optional :remark, :message, 7, "atyun.Keyword"
|
33
|
+
optional :token, :string, 8
|
34
|
+
optional :direct_url, :string, 10
|
35
|
+
end
|
36
|
+
add_message "atyun.SendWechatMessageReply" do
|
37
|
+
optional :errcode, :string, 1
|
38
|
+
optional :status, :message, 2, "atyun.Status"
|
39
|
+
end
|
40
|
+
add_message "atyun.Keyword" do
|
41
|
+
optional :value, :string, 1
|
42
|
+
end
|
43
|
+
add_message "atyun.WechatOauthRequest" do
|
44
|
+
optional :uri, :string, 1
|
45
|
+
optional :origin, :string, 2
|
46
|
+
end
|
47
|
+
add_message "atyun.WechatOauthReply" do
|
48
|
+
optional :sns_url, :string, 1
|
49
|
+
optional :status, :message, 2, "atyun.Status"
|
50
|
+
end
|
51
|
+
add_message "atyun.WechatLoginRequest" do
|
52
|
+
optional :code, :string, 3
|
53
|
+
end
|
54
|
+
add_message "atyun.WechatLoginReply" do
|
55
|
+
optional :openid, :string, 1
|
56
|
+
optional :image_url, :string, 2
|
57
|
+
optional :status, :message, 3, "atyun.Status"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
module Atyun
|
62
|
+
HelloRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.HelloRequest").msgclass
|
63
|
+
HelloReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.HelloReply").msgclass
|
64
|
+
Status = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.Status").msgclass
|
65
|
+
GetAccesstokenRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.GetAccesstokenRequest").msgclass
|
66
|
+
GetAccesstokenReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.GetAccesstokenReply").msgclass
|
67
|
+
SendWechatMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.SendWechatMessageRequest").msgclass
|
68
|
+
SendWechatMessageReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.SendWechatMessageReply").msgclass
|
69
|
+
Keyword = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.Keyword").msgclass
|
70
|
+
WechatOauthRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.WechatOauthRequest").msgclass
|
71
|
+
WechatOauthReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.WechatOauthReply").msgclass
|
72
|
+
WechatLoginRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.WechatLoginRequest").msgclass
|
73
|
+
WechatLoginReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("atyun.WechatLoginReply").msgclass
|
74
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: wechat.proto for package 'atyun'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2015 gRPC authors.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'wechat_pb'
|
21
|
+
|
22
|
+
module Atyun
|
23
|
+
module Wechat
|
24
|
+
# The greeting service definition.
|
25
|
+
class Service
|
26
|
+
|
27
|
+
include GRPC::GenericService
|
28
|
+
|
29
|
+
self.marshal_class_method = :encode
|
30
|
+
self.unmarshal_class_method = :decode
|
31
|
+
self.service_name = 'atyun.wechat'
|
32
|
+
|
33
|
+
# Sends a greeting
|
34
|
+
rpc :SayHello, HelloRequest, HelloReply
|
35
|
+
# get wechat-subscription access_token
|
36
|
+
rpc :GetSubscriptionAccessToken, GetAccesstokenRequest, GetAccesstokenReply
|
37
|
+
# send wechat-subscription message
|
38
|
+
rpc :SendWechatSubscriptionMessage, SendWechatMessageRequest, SendWechatMessageReply
|
39
|
+
# wechat oauth
|
40
|
+
rpc :WechatOauth, WechatOauthRequest, WechatOauthReply
|
41
|
+
# wechat login
|
42
|
+
rpc :WechatLogin, WechatLoginRequest, WechatLoginReply
|
43
|
+
end
|
44
|
+
|
45
|
+
Stub = Service.rpc_stub_class
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "wechat/protocal/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ampedxx-wechat-protocal"
|
7
|
+
spec.version = Wechat::Protocal::VERSION
|
8
|
+
spec.authors = ["icepoint0"]
|
9
|
+
spec.email = ["351711778@qq.com"]
|
10
|
+
|
11
|
+
spec.summary ="a"
|
12
|
+
spec.description ="a"
|
13
|
+
spec.homepage = "https://repo.scm.atyun.com.cn/atyun-mosp/wechat-protocal"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ampedxx-wechat-protocal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- icepoint0
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: a
|
56
|
+
email:
|
57
|
+
- 351711778@qq.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- CODE_OF_CONDUCT.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- lib/protocals/wechat.proto
|
73
|
+
- lib/wechat/protocal.rb
|
74
|
+
- lib/wechat/protocal/version.rb
|
75
|
+
- lib/wechat_pb.rb
|
76
|
+
- lib/wechat_services_pb.rb
|
77
|
+
- wechat-protocal.gemspec
|
78
|
+
homepage: https://repo.scm.atyun.com.cn/atyun-mosp/wechat-protocal
|
79
|
+
licenses:
|
80
|
+
- MIT
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.6.12
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: a
|
102
|
+
test_files: []
|