Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
weixin_authorize
Commits
29a4b83e
Commit
29a4b83e
authored
Mar 16, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed method name error
parent
3a2813ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/weixin_authorize/api/custom.rb
+4
-4
No files found.
lib/weixin_authorize/api/custom.rb
View file @
29a4b83e
...
...
@@ -27,7 +27,7 @@ module WeixinAuthorize
# "media_id":"MEDIA_ID"
# }
# }
def
sen
t
_image_custom
(
to_user
,
media_id
)
def
sen
d
_image_custom
(
to_user
,
media_id
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
image
,
image:
{
media_id:
media_id
}})
JSON
.
parse
(
RestClient
.
post
(
custom_base_url
,
MultiJson
.
dump
(
message
)))
end
...
...
@@ -41,7 +41,7 @@ module WeixinAuthorize
# "media_id":"MEDIA_ID"
# }
# }
def
sen
t
_voice_custom
(
to_user
,
media_id
)
def
sen
d
_voice_custom
(
to_user
,
media_id
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
voice
,
voice:
{
media_id:
media_id
}})
JSON
.
parse
(
RestClient
.
post
(
custom_base_url
,
MultiJson
.
dump
(
message
)))
end
...
...
@@ -55,7 +55,7 @@ module WeixinAuthorize
# "media_id":"MEDIA_ID"
# }
# }
def
sen
t
_video_custom
(
to_user
,
media_id
,
options
)
def
sen
d
_video_custom
(
to_user
,
media_id
,
options
)
video_options
=
{
media_id:
media_id
}.
merge
(
options
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
video
,
video:
video_options
})
JSON
.
parse
(
RestClient
.
post
(
custom_base_url
,
MultiJson
.
dump
(
message
)))
...
...
@@ -74,7 +74,7 @@ module WeixinAuthorize
# "thumb_media_id":"THUMB_MEDIA_ID"
# }
# }
def
sen
t
_music_custom
(
to_user
,
media_id
,
musicurl
,
hqmusicurl
,
options
)
def
sen
d
_music_custom
(
to_user
,
media_id
,
musicurl
,
hqmusicurl
,
options
)
music_options
=
{
thumb_media_id:
media_id
,
musicurl:
musicurl
,
hqmusicurl:
hqmusicurl
}.
merge
(
options
)
message
=
default_options
(
to_user
).
merge
({
msgtype:
music
,
music:
music_options
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment