Sha256: 619e003cb6f26877b9bded0a6f759cfa76d45f24deaaf71ee3dc311c200cad19

Contents?: true

Size: 255 Bytes

Versions: 1

Compression:

Stored size: 255 Bytes

Contents

module WP::API
  module Endpoints

    def posts(query = {})
      get("posts", query).collect do |hash|
        Post.new(hash)
      end
    end

    def post(id, query = {})
      hash = get("posts/#{id}", query)
      Post.new(hash)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wp-api-0.0.2 lib/wp/api/endpoints.rb