class Pinterest::Interest

A object representing a Pinterest interest (topic).

Constants

FIELDS

The list of fields of the object.

Public Class Methods

create(data) click to toggle source

Creates a new interest (topic) object.

@param data [Hash] The data of the new object. For a list of valid fields, see `Pinterest::Interest::FIELDS`. @return [Pinterest::Board] The new interest object.

# File lib/pinterest/models/interest.rb, line 18
def self.create(data)
  new(data)
end

Public Instance Methods

as_json(options = {}) click to toggle source

Serialize the object as a Hash that can be serialized as JSON.

@param options [Hash] The options to use to serialize. @return [Hash] The serialized object.

Calls superclass method Pinterest::Entity#as_json
# File lib/pinterest/models/interest.rb, line 26
def as_json(options = {})
  super(::Pinterest::Interest::FIELDS, options)
end