diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-03-10 11:53:29 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-03-10 11:53:29 +0000 |
commit | 4f2f408ba1a7dd976a1ec5061d05ef0439e5f942 (patch) | |
tree | d681ffebeda753c1df5450fef68bb298a27f3137 /actionwebservice/examples/metaWeblog/apis/blogger_service.rb | |
parent | 4e8ca35defa317d22a0b7916f20a4725c235b90c (diff) | |
download | rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.tar.gz rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.tar.bz2 rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.zip |
allow 0, 1, '0' or '1' to be cast to the appropriate values for boolean
values.
update XML-RPC example to work in :layered mode.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/examples/metaWeblog/apis/blogger_service.rb')
-rw-r--r-- | actionwebservice/examples/metaWeblog/apis/blogger_service.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/actionwebservice/examples/metaWeblog/apis/blogger_service.rb b/actionwebservice/examples/metaWeblog/apis/blogger_service.rb new file mode 100644 index 0000000000..b79b53e6f7 --- /dev/null +++ b/actionwebservice/examples/metaWeblog/apis/blogger_service.rb @@ -0,0 +1,34 @@ +require 'blogger_api' + +class BloggerService < ActionWebService::Base + web_service_api BloggerAPI + + def initialize + @postid = 0 + end + + def newPost(key, id, user, pw, content, publish) + $stderr.puts "id=#{id} user=#{user} pw=#{pw}, content=#{content.inspect} [#{publish}]" + (@postid += 1).to_s + end + + def editPost(key, post_id, user, pw, content, publish) + $stderr.puts "id=#{post_id} user=#{user} pw=#{pw} content=#{content.inspect} [#{publish}]" + true + end + + def getUsersBlogs(key, user, pw) + $stderr.puts "getting blogs for #{user}" + blog = Blog::Blog.new( + :url =>'http://blog', + :blogid => 'myblog', + :blogName => 'My Blog' + ) + [blog] + end + + def getUserInfo(key, user, pw) + $stderr.puts "getting user info for #{user}" + Blog::User.new(:nickname => 'user', :email => 'user@test.com') + end +end |