From fdecb6843ba8c5b0f718225f343017e11fa7f711 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Fri, 18 Feb 2005 21:22:52 +0000 Subject: rename service* to web_service*. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../examples/metaWeblog/blog_controller.rb | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'actionservice/examples/metaWeblog/blog_controller.rb') 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 -- cgit v1.2.3