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/googlesearch/direct | |
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/googlesearch/direct')
-rw-r--r-- | actionservice/examples/googlesearch/direct/google_search_api.rb | 50 | ||||
-rw-r--r-- | actionservice/examples/googlesearch/direct/search_controller.rb | 53 |
2 files changed, 51 insertions, 52 deletions
diff --git a/actionservice/examples/googlesearch/direct/google_search_api.rb b/actionservice/examples/googlesearch/direct/google_search_api.rb new file mode 100644 index 0000000000..e7e33a1105 --- /dev/null +++ b/actionservice/examples/googlesearch/direct/google_search_api.rb @@ -0,0 +1,50 @@ +class DirectoryCategory < ActionService::Struct + member :fullViewableName, :string + member :specialEncoding, :string +end + +class ResultElement < ActionService::Struct + member :summary, :string + member :URL, :string + member :snippet, :string + member :title, :string + member :cachedSize, :string + member :relatedInformationPresent, :bool + member :hostName, :string + member :directoryCategory, DirectoryCategory + member :directoryTitle, :string +end + +class GoogleSearchResult < ActionService::Struct + member :documentFiltering, :bool + member :searchComments, :string + member :estimatedTotalResultsCount, :int + member :estimateIsExact, :bool + member :resultElements, [ResultElement] + member :searchQuery, :string + member :startIndex, :int + member :endIndex, :int + member :searchTips, :string + member :directoryCategories, [DirectoryCategory] + member :searchTime, :float +end + +class GoogleSearchAPI < ActionService::API::Base + inflect_names false + + api_method :doGetCachedPage, :returns => [:string], :expects => [{:key=>:string}, {:url=>:string}] + api_method :doGetSpellingSuggestion, :returns => [:string], :expects => [{:key=>:string}, {:phrase=>:string}] + + api_method :doGoogleSearch, :returns => [GoogleSearchResult], :expects => [ + {:key=>:string}, + {:q=>:string}, + {:start=>:int}, + {:maxResults=>:int}, + {:filter=>:bool}, + {:restrict=>:string}, + {:safeSearch=>:bool}, + {:lr=>:string}, + {:ie=>:string}, + {:oe=>:string} + ] +end diff --git a/actionservice/examples/googlesearch/direct/search_controller.rb b/actionservice/examples/googlesearch/direct/search_controller.rb index e4e1d7a0eb..7c69f0225e 100644 --- a/actionservice/examples/googlesearch/direct/search_controller.rb +++ b/actionservice/examples/googlesearch/direct/search_controller.rb @@ -1,56 +1,5 @@ -class DirectoryCategory < ActionService::Struct - member :fullViewableName, :string - member :specialEncoding, :string -end - -class ResultElement < ActionService::Struct - member :summary, :string - member :URL, :string - member :snippet, :string - member :title, :string - member :cachedSize, :string - member :relatedInformationPresent, :bool - member :hostName, :string - member :directoryCategory, DirectoryCategory - member :directoryTitle, :string -end - -class GoogleSearchResult < ActionService::Struct - member :documentFiltering, :bool - member :searchComments, :string - member :estimatedTotalResultsCount, :int - member :estimateIsExact, :bool - member :resultElements, [ResultElement] - member :searchQuery, :string - member :startIndex, :int - member :endIndex, :int - member :searchTips, :string - member :directoryCategories, [DirectoryCategory] - member :searchTime, :float -end - -class GoogleSearchAPI < ActionService::API::Base - inflect_names false - - api_method :doGetCachedPage, :returns => [:string], :expects => [{:key=>:string}, {:url=>:string}] - api_method :doGetSpellingSuggestion, :returns => [:string], :expects => [{:key=>:string}, {:phrase=>:string}] - - api_method :doGoogleSearch, :returns => [GoogleSearchResult], :expects => [ - {:key=>:string}, - {:q=>:string}, - {:start=>:int}, - {:maxResults=>:int}, - {:filter=>:bool}, - {:restrict=>:string}, - {:safeSearch=>:bool}, - {:lr=>:string}, - {:ie=>:string}, - {:oe=>:string} - ] -end - class SearchController < ApplicationController - service_api GoogleSearchAPI + web_service_api :google_search wsdl_service_name 'GoogleSearch' def doGetCachedPage |