Ruby API for vkontakte.ru for syncing personal data with local StrokeDB database
Ruby
Latest commit 8dc79df Sep 21, 2008 @oleganza Merge branch 'master' of git@github.com:oleganza/vkontakte.ruby
* 'master' of git@github.com:oleganza/vkontakte.ruby:
  Removed offline stubs
  Fixes
  Corrected menu trace
  Added a way too simple readme
  Initial runner commit
Permalink
Failed to load latest commit information.
bin
lib Merge branch 'master' of git@github.com:oleganza/vkontakte.ruby Sep 20, 2008
spec added spec helper and smtp server Aug 8, 2008
.gitignore .gitignore Aug 8, 2008
MIT-LICENSE added mit license Aug 5, 2008
NOTES note on audio pages Sep 1, 2008
README
TODO

README

Vkontakte.ruby is an API for syncing vkontakte.ru personal data 
with the local StrokeDB database.

MAILING LIST

  http://groups.google.com/group/vkontakte-ruby/
  General info:
  http://groups.google.com/group/vkontakte-ruby/browse_thread/thread/139c51c04e7a4414


The following is the propsed API. It works partially, however needs more work on parsers.

me = Vkontakte::User.new "invizko@gmail.com", "whatever"
me.id #=> 5567476 
me.videos #=> [{"duration"=>"4:17", "title"=>"Gabriel", "performer"=>"Lamb", "operate"=>"40134438,1522,5567476,'2ca4745378',257"}, {"duration"=>"1:14", "title"=>"Generation of Terror", "performer"=>"Fexamot", "operate"=>"39117745,1527,5567476,'7b61c70c8a',74"}...]

me.friends.each do |f|
  friend = VkontateRuby::User.new(f) #created by-id
  if friend.friends.any? {|ff| ff == me.id }
    p "#{friend.name} is your mutual friend"
  else
    p "#{friend.name} is not your friend at all."
    
    # Maybe something like friend.invite_by(me) here?
  end
end

Puppets

Call them bots, if you please. They are used to browse other user's profiles like this:


VkontakteRuby::User.new("invizko@gmail.com", "whatever").puppetize! #=> [<#User...>], the array of all active puppets

other = VkontakteRuby::User.new("5567476") #no password or email, just id
other.music #=> [{"duration"=>"2:51", "title"=>"Дождь", "performer"=>"Эллизиум", "operate"=>"41451493,1069,4154652,'42ee3564e0',171"}, {"duration"=>"2:58", "title"=>"Я кричу", "performer"=>"Эллизиум", "operate"=>"41414509,1110,324642,'264be6e4fa',178"}]

Runner

Runner is a Ruby-CLI-vkontakte interface, check it out in bin/runner

MIT License.

CONTRIBUTORS

* Oleg Andreev <oleganza@gmail.com>
* Alexandr Naumchuk <alex.naumchuk@gmail.com>
* Victor Brylew <victor.brylew@gmail.com>
* Yaroslaff Fedin <invizko@gmail.com>