class Skypescraper::Conversation

Constants

MESSAGES_QUERY

type = 61 is the ordinary message

PARTICIPANTS_QUERY

Attributes

id[R]
title[R]

Public Class Methods

new(id, title) click to toggle source
# File lib/skypescraper/conversation.rb, line 7
def initialize(id, title)
  @id = id
  @title = title
end

Public Instance Methods

messages() click to toggle source
# File lib/skypescraper/conversation.rb, line 39
def messages
  return @messages if @messages

  @messages = []
  Skypescraper::Extractor.connection.execute(MESSAGES_QUERY, id) do |row|
    messages << Skypescraper::Message.new(*row)
  end
  @messages
end
participants() click to toggle source
# File lib/skypescraper/conversation.rb, line 20
def participants
  return @participants if @participants
  @participants = []
  Skypescraper::Extractor.connection.execute(PARTICIPANTS_QUERY, id) do |row|
    @participants << Skypescraper::Contact.new(*row)
  end
  @participants
end