Sha256: d6bc17059efeb70172c7d56759ec3a9b30a5a13f7681ea001e8779bc969701c8

Contents?: true

Size: 1.31 KB

Versions: 94

Compression:

Stored size: 1.31 KB

Contents

require 'meta_weblog_api'

class MetaWeblogService < ActionWebService::Base
  web_service_api MetaWeblogAPI

  def initialize
    @postid = 0
  end

  def newPost(id, user, pw, struct, publish)
    $stderr.puts "id=#{id} user=#{user} pw=#{pw}, struct=#{struct.inspect} [#{publish}]"
    (@postid += 1).to_s
  end

  def editPost(post_id, user, pw, struct, publish)
    $stderr.puts "id=#{post_id} user=#{user} pw=#{pw} struct=#{struct.inspect} [#{publish}]"
    true
  end

  def getPost(post_id, user, pw)
    $stderr.puts "get post #{post_id}"
    Blog::Post.new(:title => 'hello world', :description => 'first post!')
  end

  def getCategories(id, user, pw)
    $stderr.puts "categories for #{user}"
    cat = Blog::Category.new(
      :description => 'Tech',
      :htmlUrl     => 'http://blog/tech',
      :rssUrl      => 'http://blog/tech.rss')
    [cat]
  end

  def getRecentPosts(id, user, pw, num)
    $stderr.puts "recent #{num} posts for #{user} on blog #{id}"
    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

Version data entries

94 entries across 94 versions & 28 rubygems

Version Path
GavinJoyce-actionwebservice-2.2.3 examples/metaWeblog/apis/meta_weblog_service.rb
datanoise-actionwebservice-2.1.0 examples/metaWeblog/apis/meta_weblog_service.rb
datanoise-actionwebservice-2.1.1 examples/metaWeblog/apis/meta_weblog_service.rb
datanoise-actionwebservice-2.2.2 examples/metaWeblog/apis/meta_weblog_service.rb
datanoise-actionwebservice-2.3.2 examples/metaWeblog/apis/meta_weblog_service.rb
davidsmalley-actionwebservice-2.3.1 examples/metaWeblog/apis/meta_weblog_service.rb
davidsmalley-actionwebservice-2.3 examples/metaWeblog/apis/meta_weblog_service.rb
dougbarth-actionwebservice-2.1.1 examples/metaWeblog/apis/meta_weblog_service.rb
dougbarth-actionwebservice-2.3.3 examples/metaWeblog/apis/meta_weblog_service.rb
dougbarth-actionwebservice-2.3.4 examples/metaWeblog/apis/meta_weblog_service.rb
feldpost-actionwebservice-2.3.3 examples/metaWeblog/apis/meta_weblog_service.rb
mozy-actionwebservice-2.3.2 examples/metaWeblog/apis/meta_weblog_service.rb
nmeans-actionwebservice-2.1.1 examples/metaWeblog/apis/meta_weblog_service.rb
panztel-actionwebservice-2.3.4 examples/metaWeblog/apis/meta_weblog_service.rb
pelle-actionwebservice-2.3.3 examples/metaWeblog/apis/meta_weblog_service.rb
rickenharp-actionwebservice-2.3.4 examples/metaWeblog/apis/meta_weblog_service.rb
tonycoco-actionwebservice-2.3.3 examples/metaWeblog/apis/meta_weblog_service.rb
tonycoco-actionwebservice-2.3.4 examples/metaWeblog/apis/meta_weblog_service.rb
keshav-actionwebservice-1.0.0 examples/metaWeblog/apis/meta_weblog_service.rb
datanoise-actionwebservice-2.3.5 examples/metaWeblog/apis/meta_weblog_service.rb