l.a.i.q.IQuestionTargetPublic(ISearchableByQuestionOwner) : interface documentation

Part of lp.answers.interfaces.questiontarget View In Hierarchy

Known subclasses: lp.answers.interfaces.webservice.IQuestionTarget

Methods that anonymous in user can access.
Method getQuestion Return the question by its id, if it is applicable to this target.
Method findSimilarQuestions Return questions similar to phrase.
Method getAnswerContactsForLanguage Return the list of Persons that provide support for a language.
Method getAnswerContactRecipients Return an INotificationRecipientSet of answer contacts.
Method getSupportedLanguages Return a list of languages spoken by at the answer contacts.
List answer_contacts Persons that are willing to provide support for this target. They receive email notifications about each new question as well as for changes to any questions related to this target.
List direct_answer_contacts IPersons that registered as answer contacts explicitely on this target. (answer_contacts may include answer contacts inherited from other context.)
Method canUserAlterAnswerContact Can the user add or remove the answer contact.

Inherited from ISearchableByQuestionOwner:

Method searchQuestions Return the questions from the collection matching search criteria.

Inherited from IQuestionCollection (via ISearchableByQuestionOwner):

Method getQuestionLanguages Return the set of ILanguage used by all the questions in the
@operation_parameters(Int(_('Question Number'), True))
@export_read_operation()
@operation_for_version('devel')
def getQuestion(question_id):
Return the question by its id, if it is applicable to this target.

If there is no such question number for this target, return None

Unknown Field: question_idA question id.
@operation_parameters(TextLine(_('A phrase'), True))
@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('devel')
def findSimilarQuestions(phrase):
Return questions similar to phrase.

Return a list of question similar to the provided phrase. These questions will be found using a fuzzy search. The list is ordered from the most similar question to the least similar question.

ParametersphraseA phrase such as the summary of a question.
@operation_parameters(Reference(ILanguage))
@operation_returns_collection_of(IPerson)
@export_read_operation()
@operation_for_version('devel')
def getAnswerContactsForLanguage(language):
Return the list of Persons that provide support for a language.

An answer contact supports questions in their preferred languages.

def getAnswerContactRecipients(language):
Return an INotificationRecipientSet of answer contacts.

Return an INotificationRecipientSet of the answer contacts and the reason they are recipients of an email. The answer contacts are selected by their language and the fact that they are answer contacts for the QuestionTarget.

Unknown Field: languagean ILanguage or None. When language is none, all answer contacts are returned.
@operation_returns_collection_of(ILanguage)
@export_read_operation()
@operation_for_version('devel')
def getSupportedLanguages():
Return a list of languages spoken by at the answer contacts.

An answer contact is considered to speak a given language if that language is listed as one of their preferred languages.

answer_contacts =
Persons that are willing to provide support for this target. They receive email notifications about each new question as well as for changes to any questions related to this target.
direct_answer_contacts =
IPersons that registered as answer contacts explicitely on this target. (answer_contacts may include answer contacts inherited from other context.)
@operation_parameters(PublicPersonChoice(_('The user or an administered team'), True, 'ValidPersonOrTeam'))
@call_with(REQUEST_USER)
@export_read_operation()
@operation_for_version('devel')
def canUserAlterAnswerContact(person, subscribed_by):
Can the user add or remove the answer contact.

Users can add or remove themselves or one of the teams they administered. Admins and target owners can add/remove anyone.

ParameterspersonThe IPerson that is or will be an answer contact.
subscribed_byThe IPerson making the change.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.