~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/interfaces/webservice.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-17 01:49:32 UTC
  • mfrom: (13041.2.27 answers-api-2)
  • Revision ID: launchpad@pqm.canonical.com-20110517014932-d97eobi9byvedefn
[r=benji][bug=782093] Export IQuestionCollection methods and
        IQuestionMessage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from lazr.restful.declarations import LAZR_WEBSERVICE_EXPORTED
18
18
 
19
 
from canonical.launchpad.components.apihelpers import patch_entry_return_type
 
19
from canonical.launchpad.components.apihelpers import (
 
20
    patch_collection_return_type,
 
21
    patch_entry_return_type,
 
22
    patch_reference_property,
 
23
    )
20
24
from lp.answers.interfaces.question import IQuestion
21
 
from lp.answers.interfaces.questioncollection import IQuestionSet
 
25
from lp.answers.interfaces.questioncollection import (
 
26
    IQuestionSet,
 
27
    ISearchableByQuestionOwner,
 
28
    )
 
29
from lp.answers.interfaces.questionmessage import  IQuestionMessage
22
30
from lp.answers.interfaces.questiontarget import IQuestionTarget
23
31
 
24
32
 
25
33
IQuestionSet.queryTaggedValue(
26
34
    LAZR_WEBSERVICE_EXPORTED)['collection_entry_schema'] = IQuestion
27
35
patch_entry_return_type(IQuestionSet, 'get', IQuestion)
 
36
patch_collection_return_type(
 
37
    IQuestionTarget, 'findSimilarQuestions', IQuestion)
 
38
patch_collection_return_type(
 
39
    ISearchableByQuestionOwner, 'searchQuestions', IQuestion)
 
40
patch_reference_property(IQuestionMessage, 'question', IQuestion)