Skip to content

Ruby API for vkontakte.ru for syncing personal data with local StrokeDB database

License

Notifications You must be signed in to change notification settings

Inviz/vkontakte.ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

me = VkontateRuby::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 browser 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"}]



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>




About

Ruby API for vkontakte.ru for syncing personal data with local StrokeDB database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%