Sha256: cf44ce5a7a01c06f3b4801fc8859b898319861041d73c6dd082420dc17566a29
Contents?: true
Size: 1.76 KB
Versions: 1
Compression:
Stored size: 1.76 KB
Contents
## The Namba Ruby gem [](http://travis-ci.org/ZeroOneStudio/namba) A Ruby wrapper for the Namba API. The full API description is available [here][]. [here]: http://dev.namba.kg/api_description.php ## Installation gem install namba Or put to your `Gemfile` gem "namba" ## Usage require 'namba' Namba.configure do |config| config.username = "your_username" config.password = "secret" config.locale = :kg end n = Namba.new() Use `:kz` locale if you want to access [namba.kz][] API. Default value is `:kg` [namba.kz]: http://www.namba.kz ## Methods spread on all Namba API n.get_user_info(name) # returns specific user information n.get_user_video(name) # returns specific user's video list n.get_user_photo(name) # returns specific user's photo list n.get_friends_list(name) # returns specific user's friends list Eg.: n.get_user_info("puzanov") Leave `name` parameter blank to get information about configured user. Eg.: n.get_user_info() ## Methods dealing with personal stuff only n.set_status(text) # sets user status with `text` n.get_events # returns user's friends' events n.get_new_mail_count # returns count of unread messages n.get_last_mail # returns list of inbox messages ordered by creation date. 20 messages is maximum ## [Namba Comments][] Rails helper If you use namba gem with Rails you can easily create a comment widget. For example, in your *.erb template: <%= namba_comments("tamasha", 4850) %> # where "tamasha" -- component_name, "4850" -- component_id (read more in Namba API docs) [Namba Comments]: http://dev.namba.kg/api_comments.php ## Licence MIT License Copyright (c) 2012 ZERO.ONE
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
namba-1.1.0 | README.md |