Sha256: d3135e16f288b0512a5e5d219d68d545d2872da6eb0a8663b5f45d53c87fe590

Contents?: true

Size: 694 Bytes

Versions: 12

Compression:

Stored size: 694 Bytes

Contents

class TumblrWrapper::Post < TumblrWrapper::BlogResource
  ##
  # Required parameters: :type
  # http://www.tumblr.com/docs/en/api/v2#posting
  def create(parameters = {})
    validate_present(:type, parameters)
    validate_not_present(:id, parameters)

    http_post('post', parameters)
  end

  ##
  # Required parameters: :id
  # http://www.tumblr.com/docs/en/api/v2#editing
  def update(parameters = {})
    validate_present(:id, parameters)
    http_post('post/edit', parameters)
  end

  ##
  # Required parameters: :id
  # http://www.tumblr.com/docs/en/api/v2#editing
  def delete(parameters = {})
    validate_present(:id, parameters)
    http_post('post/delete', parameters)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tumblr_wrapper-0.4.2 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.4.1 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.4.0 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.3.4 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.3.3 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.3.2 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.3.1 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.3.0 lib/tumblr_wrapper/resources/post.rb
tumblr_wrapper-0.2.1 lib/tumblr_wrapper/post.rb
tumblr_wrapper-0.2.0 lib/tumblr_wrapper/post.rb
tumblr_wrapper-0.1.1 lib/tumblr_wrapper/post.rb
tumblr_wrapper-0.1.0 lib/tumblr_wrapper/post.rb