Checkout of Instiki Trunk 1/21/2007.
This commit is contained in:
commit
69b62b6f33
1138 changed files with 139586 additions and 0 deletions
60
vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb
vendored
Normal file
60
vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# see the blogger API spec at http://www.blogger.com/developers/api/1_docs/
|
||||
# note that the method signatures are subtly different to metaWeblog, they
|
||||
# are not identical. take care to ensure you handle the different semantics
|
||||
# properly if you want to support blogger API too, to get maximum compatibility.
|
||||
#
|
||||
|
||||
module Blog
|
||||
class Blog < ActionWebService::Struct
|
||||
member :url, :string
|
||||
member :blogid, :string
|
||||
member :blogName, :string
|
||||
end
|
||||
|
||||
class User < ActionWebService::Struct
|
||||
member :nickname, :string
|
||||
member :userid, :string
|
||||
member :url, :string
|
||||
member :email, :string
|
||||
member :lastname, :string
|
||||
member :firstname, :string
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# blogger
|
||||
#
|
||||
class BloggerAPI < ActionWebService::API::Base
|
||||
inflect_names false
|
||||
|
||||
api_method :newPost, :returns => [:string], :expects => [
|
||||
{:appkey=>:string},
|
||||
{:blogid=>:string},
|
||||
{:username=>:string},
|
||||
{:password=>:string},
|
||||
{:content=>:string},
|
||||
{:publish=>:bool}
|
||||
]
|
||||
|
||||
api_method :editPost, :returns => [:bool], :expects => [
|
||||
{:appkey=>:string},
|
||||
{:postid=>:string},
|
||||
{:username=>:string},
|
||||
{:password=>:string},
|
||||
{:content=>:string},
|
||||
{:publish=>:bool}
|
||||
]
|
||||
|
||||
api_method :getUsersBlogs, :returns => [[Blog::Blog]], :expects => [
|
||||
{:appkey=>:string},
|
||||
{:username=>:string},
|
||||
{:password=>:string}
|
||||
]
|
||||
|
||||
api_method :getUserInfo, :returns => [Blog::User], :expects => [
|
||||
{:appkey=>:string},
|
||||
{:username=>:string},
|
||||
{:password=>:string}
|
||||
]
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue