Package pinder :: Module room :: Class Room

Class Room

source code

object --+
         |
        Room

A Campfire room.

Instance Methods
 
__init__(self, campfire, id, name=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
__eq__(self, other) source code
 
join(self, force=False)
Joins the room; if 'force' is True join even if already joined.
source code
 
leave(self)
Leaves the room.
source code
 
toggle_guest_access(self)
Toggles guest access on and off.
source code
 
guest_access_enabled(self)
Checks if the guest access is enabled.
source code
 
guest_url(self)
Gets the URL for guest access.
source code
 
guest_invite_code(self)
Gets the invite code for guest access.
source code
 
change_name(self, name)
Changes the name of the room.
source code
 
rename(self, name)
Changes the name of the room.
source code
 
change_topic(self, topic)
Changes the topic of the room.
source code
 
topic(self)
Gets the current topic, if any.
source code
 
lock(self)
Locks the room to prevent new users from entering.
source code
 
unlock(self)
Unlocks the room.
source code
 
ping(self, force=False)
Pings the server updating the last time we have been seen there.
source code
 
destroy(self)
Destroys the room.
source code
 
users(self)
Lists the users chatting in the room.
source code
 
speak(self, message)
Send a message to the room.
source code
 
paste(self, message)
Paste a message to the room.
source code
 
transcripts(self)
Gets the dates of transcripts of the room.
source code
 
transcript(self, date)
Get the transcript for the given date (a datetime.date instance).
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Instance Variables
  id
The room id.
  name
The name of the room.
  uri
The urlparsed URI of the room.
Properties

Inherited from object: __class__

Method Details

__init__(self, campfire, id, name=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

join(self, force=False)

source code 

Joins the room; if 'force' is True join even if already joined.

Returns True if successfully joined, False otherwise.

leave(self)

source code 

Leaves the room.

Returns True if successfully left, False otherwise.

toggle_guest_access(self)

source code 

Toggles guest access on and off.

Returns True if successfully toggled, False otherwise.

guest_access_enabled(self)

source code 

Checks if the guest access is enabled.

Returns True if the guest access is enabled, False otherwise.

guest_url(self)

source code 

Gets the URL for guest access.

Returns None if the guest access is not enabled.

guest_invite_code(self)

source code 

Gets the invite code for guest access.

Returns None if the guest access is not enabled.

change_name(self, name)

source code 

Changes the name of the room.

Returns the new name if successfully changed, None otherwise.

rename(self, name)

source code 

Changes the name of the room.

Returns the new name if successfully changed, None otherwise.

change_topic(self, topic)

source code 

Changes the topic of the room.

Returns the new topic if successfully changed, None otherwise.

lock(self)

source code 

Locks the room to prevent new users from entering.

Returns True if successfully locked, False otherwise.

unlock(self)

source code 

Unlocks the room.

Returns True if successfully unlocked, False otherwise.

ping(self, force=False)

source code 

Pings the server updating the last time we have been seen there.

Returns True if successfully pinged, False otherwise.

destroy(self)

source code 

Destroys the room.

Returns True if successfully destroyed, False otherwise.

users(self)

source code 

Lists the users chatting in the room.

Returns a set of the users.

speak(self, message)

source code 

Send a message to the room.

Returns the message if successfully sent it, None otherwise.

paste(self, message)

source code 

Paste a message to the room.

Returns the message if successfully pasted it, None otherwise.

transcripts(self)

source code 

Gets the dates of transcripts of the room.

Returns a list of dates.

transcript(self, date)

source code 
Get the transcript for the given date (a datetime.date instance).

Returns a list of message data:
 * id: the id of the message
 * person: the name of the person who wrote the message if any
 * user_id: the user id of the person if any
 * message: the message itself if any