struct PostsDownloader::Tipeee::NewsItem

Included Modules

Defined in:

Constructors

Class Method Summary

Instance Method Summary

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(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : JSON::PullParser) #

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

def self.from_bson(bson : BSON) #

NOTE See self.new.


Instance Method Detail

def [](value : String) #

def content : Union(PostsDownloader::Tipeee::ContentV2, Nil) #

def content_included : Hash(PostsDownloader::Tipeee::ComponentType, Int64) | Array(String) #

def created_at : Time #

def id : Int64 #

def is_campaign_content : Union(Bool, Nil) #

def is_pinned : Bool #

def is_private : Bool #

def name : String #

def old_content : String #

def parameters : PostsDownloader::Tipeee::NewsItemParameters | Array(String) | Nil #

def published_at : Time #

def stats : Hash(PostsDownloader::Tipeee::StatType, Int64) #

def status : String #

def survey : Union(PostsDownloader::Tipeee::Survey, Nil) #

def tags : Array(PostsDownloader::Tipeee::Tag) #


def to_bson(bson = BSON.new) #

Converts to a BSON representation.

user = User.new name: "John"
bson = user.to_bson

def updated_at : Time #