ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class WebForumImpl.WebForumImpl(system, config)¶
This class contains the interface that lets a <no title> interact with a web forum without knowing any details about the actual forum being used.
- confirm_login()¶
Check if a user seems to be logged in now.
- exit(save=False)¶
Exit for the forum
Parameters:
save: ignored, just accepted to maintain function prototype
- has_threads()¶
Check if there are any available threads to read/comment on.
- logout()¶
Log the current user out
- new_thread(topic, body)¶
Create a new discussion thread with the given topic and body.
Parameters:
topic: a string that is the topic of the new thread
body: a string that is the body of the post creating the thread
- open()¶
Open the browser and go to the forum
- read_random_thread()¶
Decend into any available thread and spend some time “reading” the posts in this thread.
- read_thread(thread)¶
Descend into a particular thread and spend some time “reading” the posts in that thread.
Parameters:
thread: the string identifying the thread to read
- reply_to_thread(body)¶
While reading a thread post a new reply to it.
Parameters:
body: the string containing the text of the post
- WebForumImpl.get_forum(system, config, forum_type=None)¶
This is the factory method that will create instances of the correct type for the given request.
Parameters:
system: a <no title> instance to talk to the target system
config: a <no title> instance defining this user
forum_type: a string specifying the type to create, overriding any value in the config param