diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-02-18 21:22:52 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-02-18 21:22:52 +0000 |
commit | fdecb6843ba8c5b0f718225f343017e11fa7f711 (patch) | |
tree | b8bd2050955bbc528ee23f3d42a18ee31d5f9833 /actionservice/examples/metaWeblog | |
parent | 5dcbe933dfd34bb799ee370792b6066f6d6ceaac (diff) | |
download | rails-fdecb6843ba8c5b0f718225f343017e11fa7f711.tar.gz rails-fdecb6843ba8c5b0f718225f343017e11fa7f711.tar.bz2 rails-fdecb6843ba8c5b0f718225f343017e11fa7f711.zip |
rename service* to web_service*.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionservice/examples/metaWeblog')
-rw-r--r-- | actionservice/examples/metaWeblog/blog_controller.rb | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/actionservice/examples/metaWeblog/blog_controller.rb b/actionservice/examples/metaWeblog/blog_controller.rb index b23ccb04c6..aff2e909ea 100644 --- a/actionservice/examples/metaWeblog/blog_controller.rb +++ b/actionservice/examples/metaWeblog/blog_controller.rb @@ -1,3 +1,6 @@ +# point your client at http://project_url/blog/api to test +# this + # structures as defined by the metaWeblog/blogger # specifications. module Blog @@ -73,7 +76,7 @@ class MetaWeblogAPI < ActionService::API::Base end class BlogController < ApplicationController - service_api MetaWeblogAPI + web_service_api MetaWeblogAPI def initialize @postid = 0 @@ -99,23 +102,26 @@ class BlogController < ApplicationController def getUsersBlogs $stderr.puts "Returning user %s's blogs" % @params['username'] - blog = Blog::Blog.new - blog.url = 'http://blog.xeraph.org' - blog.blogid = 'sttm' - blog.blogName = 'slave to the machine' + blog = Blog::Blog.new( + :url =>'http://blog.xeraph.org', + :blogid => 'sttm', + :blogName => 'slave to the machine' + ) [blog] end def getRecentPosts $stderr.puts "Returning recent posts (%d requested)" % @params['numberOfPosts'] - post1 = Blog::Post.new - post1.title = 'first post!' - post1.link = 'http://blog.xeraph.org/testOne.html' - post1.description = 'this is the first post' - post2 = Blog::Post.new - post2.title = 'second post!' - post2.link = 'http://blog.xeraph.org/testTwo.html' - post2.description = 'this is the second post' + post1 = Blog::Post.new( + :title => 'first post!', + :link => 'http://blog.xeraph.org/testOne.html', + :description => 'this is the first post' + ) + post2 = Blog::Post.new( + :title => 'second post!', + :link => 'http://blog.xeraph.org/testTwo.html', + :description => 'this is the second post' + ) [post1, post2] end end |