Sha256: 351c03898171310eb493810ef51d7d6d738c27a7e7c7cd9e07449c2e28bdf1d1

Contents?: true

Size: 279 Bytes

Versions: 11

Compression:

Stored size: 279 Bytes

Contents

module ButterCMS
  class Post < ButterResource
    def self.resource_path
      "/posts"
    end

    def self.search(query = '', options = {})
      response = ButterCMS.request('/search', {query: query}.merge(options))

      self.create_collection(response)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
buttercms-ruby-1.2.0 lib/buttercms/post.rb
buttercms-ruby-1.1.3 lib/buttercms/post.rb
buttercms-ruby-1.1.2 lib/buttercms/post.rb
buttercms-ruby-1.1.1 lib/buttercms/post.rb
buttercms-ruby-1.1.0 lib/buttercms/post.rb
buttercms-ruby-1.0.10 lib/buttercms/post.rb
buttercms-ruby-1.0.9 lib/buttercms/post.rb
buttercms-ruby-1.0.8 lib/buttercms/post.rb
buttercms-ruby-1.0.7 lib/buttercms/post.rb
buttercms-ruby-1.0.6 lib/buttercms/post.rb
buttercms-ruby-1.0.5 lib/buttercms/post.rb