Class: ShareChecker::Providers::Odnoklassniki
- Inherits:
-
ShareChecker::Provider
- Object
- ShareChecker::Provider
- ShareChecker::Providers::Odnoklassniki
- Defined in:
- lib/share_checker/providers/odnoklassniki.rb
Instance Attribute Summary
Attributes inherited from ShareChecker::Provider
Instance Method Summary collapse
-
#parse(response) ⇒ Object
Response sample.
- #url ⇒ Object
Methods inherited from ShareChecker::Provider
#check, get, #initialize, #method_missing, #parse_json, #parse_xml
Constructor Details
This class inherits a constructor from ShareChecker::Provider
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShareChecker::Provider
Instance Method Details
#parse(response) ⇒ Object
Response sample
ODKL.updateCount(‘odklcnt0’,‘147’);
9 10 11 |
# File 'lib/share_checker/providers/odnoklassniki.rb', line 9 def parse(response) response =~ /\'(\d+)\'\)\;$/ ? $1.to_i : 0 end |
#url ⇒ Object
13 14 15 |
# File 'lib/share_checker/providers/odnoklassniki.rb', line 13 def url "http://www.odnoklassniki.ru/dk?st.cmd=extLike&uid=odklcnt0&ref=" end |