struct
PostsDownloader::Tipeee::NewsItem
- PostsDownloader::Tipeee::NewsItem
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
- JSON::Serializable::Strict
- YAML::Serializable
Defined in:
Constructors
- .new(thread : PostsDownloader::Tipeee::Thread, id : Int64, name : String, status : String, content : Union(PostsDownloader::Tipeee::ContentV2, Nil), created_at : Time, published_at : Time, updated_at : Time, is_private : Bool, is_campaign_content : Union(Bool, Nil), parameters : PostsDownloader::Tipeee::NewsItemParameters | Array(String) | Nil, tags : Array(PostsDownloader::Tipeee::Tag), old_content : String, survey : Union(PostsDownloader::Tipeee::Survey, Nil), content_included : Hash(PostsDownloader::Tipeee::ComponentType, Int64) | Array(String), is_pinned : Bool, stats : Hash(PostsDownloader::Tipeee::StatType, Int64))
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
-
.new(bson : BSON)
Allocate an instance and copies data from a BSON struct.
Class Method Summary
-
.from_bson(bson : BSON)
NOTE See
self.new.
Instance Method Summary
- #[](value : String)
- #content : Union(PostsDownloader::Tipeee::ContentV2, Nil)
- #content_included : Hash(PostsDownloader::Tipeee::ComponentType, Int64) | Array(String)
- #created_at : Time
- #id : Int64
- #is_campaign_content : Union(Bool, Nil)
- #is_pinned : Bool
- #is_private : Bool
- #name : String
- #old_content : String
- #parameters : PostsDownloader::Tipeee::NewsItemParameters | Array(String) | Nil
- #published_at : Time
- #stats : Hash(PostsDownloader::Tipeee::StatType, Int64)
- #status : String
- #survey : Union(PostsDownloader::Tipeee::Survey, Nil)
- #tags : Array(PostsDownloader::Tipeee::Tag)
- #thread : PostsDownloader::Tipeee::Thread
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
- #updated_at : Time
Constructor Detail
def self.new(thread : PostsDownloader::Tipeee::Thread, id : Int64, name : String, status : String, content : Union(PostsDownloader::Tipeee::ContentV2, Nil), created_at : Time, published_at : Time, updated_at : Time, is_private : Bool, is_campaign_content : Union(Bool, Nil), parameters : PostsDownloader::Tipeee::NewsItemParameters | Array(String) | Nil, tags : Array(PostsDownloader::Tipeee::Tag), old_content : String, survey : Union(PostsDownloader::Tipeee::Survey, Nil), content_included : Hash(PostsDownloader::Tipeee::ComponentType, Int64) | Array(String), is_pinned : Bool, stats : Hash(PostsDownloader::Tipeee::StatType, Int64))
#
def self.new(bson : BSON)
#
Allocate an instance and copies data from a BSON struct.
class User
include BSON::Serializable
property name : String
end
data = BSON.new
data["name"] = "John"
User.new(data)
Class Method Detail
Instance Method Detail
def to_bson(bson = BSON.new)
#
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson