Beispiel #1
0
# (at your option) any later version.
#
# Canopsis is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Canopsis.  If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------

from canopsis.common.ws import route
from canopsis.vevent.manager import VEventManager
from canopsis.common.middleware import Middleware

vem = VEventManager(
    storage=Middleware.get_middleware_by_uri(VEventManager.VEVENT_COLL_URL))

DEFAULT_ROUTE = 'vevent'  #: route specifics to vevents document


def exports(ws):
    @route(ws.application.get, name=DEFAULT_ROUTE)
    def get_by_uids(ids,
                    limit=0,
                    skip=0,
                    sort=None,
                    projection=None,
                    with_count=False):
        """Get documents by uids.

        :param list ids: list of document ids.