flyerhzm / rfetion

rfetion is a ruby gem for China Mobile fetion service that you can send SMS free.
61 stars 8 forks source link

h1. rfetion

rfetion is a ruby gem for China Mobile fetion service that you can send SMS free.

I'm still developing according to the Fetion 2010 version which adds the verification code to protect bot. You should download the version before 0.5.0 which does not trigger the verification.


h2. Demo

see "http://fetion.heroku.com":http://fetion.heroku.com


h2. Install


gem sources -a http://gemcutter.org
gem install rfetion

h2. Usage


Fetion.send_sms(options)
Fetion.send_msg(options)

options can be: mobile_no sid password receivers, if receivers are nil, send sms to yourself content logger_level


Fetion.set_schedule_sms(options)

options can be: mobile_no sid password receivers, if receivers are nil, send sms to yourself content time, time format is %Y-%m-%d %H:%M:%S logger_level


Fetion.add_buddy(options)

options can be: mobile_no sid password friend_mobile friend_sip logger_level


h2. Shell command

you can use it in shell command directly


Usage: rfetion [options]

    Example: rfetion -m mobile -p password -c sms_content
             rfetion -s sip -p password -c sms_content
             rfetion -m mobile -p password -r mobile_or_fetion_numbers -c sms_content
             rfetion -m mobile -p password -r mobile_or_fetion_numbers -c sms_content -t time
             rfetion -m mobile -p password --add-buddy-with-mobile friend_mobile
             rfetion -s sip -p password --add-buddy-with-mobile friend_mobile
             rfetion -m mobile -p password --add-buddy-with-sip friend_sip

    -m, --mobile MOBILE              Fetion mobile number
    -s, --sip FETION_SIP             Fetion sid number
    -p, --password PASSWORD          Fetion password
    -c, --content CONTENT            Fetion message content
    -r, --receivers MOBILE,SIP       Receivers' Fetion mobile numbers or fetion sip numbers, if no recievers, send sms to yourself
    -t, --time TIME                  Schedule time to send sms, format is "2009-12-10 20:00:00"
        --add-buddy-with-mobile MOBILE
                                     Add friend mobile as fetion friend
        --add-buddy-with-sip SIP     Add friend fetion sip as fetion friend

different mode:
        --debug                      debug mode
        --silence                    silence mode

Common options:
    -v, --version                    Show this version
    -h, --help                       Show this message

Copyright (c) 2009 Richard Huang (flyerhzm@gmail.com), released under the MIT license