Class: Pinterest::User
Overview
A object representing a Pinterest user.
Constant Summary
- FIELDS =
The list of fields of the object.
["id", "username", "first_name", "last_name", "bio", "created_at", "counts", "image"].freeze
Class Method Summary collapse
-
.create(data) ⇒ Pinterest::Board
Creates a new user object.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ Hash
Serialize the object as a Hash that can be serialized as JSON.
Methods inherited from Entity
Constructor Details
This class inherits a constructor from Pinterest::Entity
Class Method Details
.create(data) ⇒ Pinterest::Board
Creates a new user object.
18 19 20 21 22 23 |
# File 'lib/pinterest/models/user.rb', line 18 def self.create(data) data["created_at"] = Pinterest::Entity.(data["created_at"]) if data["created_at"] data["image"] = Pinterest::Image.new(data["image"]) if data["image"] new(data) end |