Class: SMS::JoyzenClient
Instance Method Summary
collapse
#available?, #from, #from=, #initialize, #remains, #to_s
Instance Method Details
#deliver(to, msg) ⇒ Object
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/sms_client/client/joyzen_client.rb', line 23
def deliver(to, msg)
return false unless super
page = @agent.get("http://www.joyzen.co.kr/community/message/pop_message.html")
page.form_with(:name => "smssingle") do |form|
form.to_message = msg
form.phone = from
form.group_name1 = to
end.submit
end
|
#login(id, password) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/sms_client/client/joyzen_client.rb', line 5
def login(id, password)
@agent.follow_meta_refresh = true
page = @agent.get("http://www.joyzen.co.kr/member/login_01.html?login_url=http%3A%2F%2Fwww.joyzen.co.kr%2Fmember%2Flogin_01.html")
page = page.form_with(:name => "login") do |form|
form.member_id = id
form.member_pw = password
end.submit
page = @agent.get("http://www.joyzen.co.kr/community/message/pop_message.html")
page = @agent.get("http://www.joyzen.co.kr/community/message/pop_message.html")
@remains = page.search("tr td font strong").first.content.to_i
super
rescue Exception => e
SMS.log.debug e if SMS.log
false
end
|