Gyazz
Read/write Gyazz data
Installation
% gem install gyazz
Usage
read/write data at http://gyazz.com/test/aaa
require 'gyazz'
wiki = Gyazz.wiki('test')
page = wiki.page('aaa')
# read page
puts page.text
# write page
page.text = ["Toshiyuki Masui", "masui@pitecan.com", "....."]
# URL
puts page.url ## => "http://gyazz.com/test/aaa"
# page list
wiki.pages.each do |page|
puts "- #{page.name}"
end
# related pages
Gyazz.wiki('test').page('aaa').related_pages.each do |page|
puts "-> #{page.name}"
end
read/write data at http://your-private-gyazz.com/wiki_name/page_name
wiki = Gyazz.wiki('wiki_name')
wiki.host = 'http://your-private-gyazz.com'
wiki.auth = {:username => 'user', :password => 'pass'}
puts wiki.page('page_name').text
Test
% gem install bundler
% bundle install
% bundle exec rake test
test with local gyazz
% GYAZZ_HOST="http://localhost:3000" bundle exec rake test
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request