(self, request:HttpRequest, project_id)
return JsonResponse(pointsets, safe=False)
List all available point sets or optionally a sub set.
        ---
        parameters:
          - name: project_id
            description: Project of the returned point sets
            type: integer
            paramType: path
            required: true
          - name: simple
            description: Wheter or not only ID and name should be returned
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: with_points
            description: Wheter linked points should returned as well.
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: pointset_ids
            description: A list of point set IDs to which the query is constrained.
            type: array
            paramType: path
            required: false
          - name: order_by
            description: The field to order the response list by (name, id).
            type: string
            paramType: path
            required: false
            defaultValue: 'id'
List all available point sets or optionally a sub set.
        ---
        parameters:
          - name: project_id
            description: Project of the returned point sets
            type: integer
            paramType: path
            required: true
          - name: simple
            description: Wheter or not only ID and name should be returned
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: with_points
            description: Wheter linked points should returned as well.
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: pointset_ids
            description: A list of point set IDs to which the query is constrained.
            type: array
            paramType: path
            required: false
          - name: order_by
            description: The field to order the response list by (name, id).
            type: string
            paramType: path
            required: false
            defaultValue: 'id'
List all available point sets or optionally a sub set . --- parameters : - name : project_id description : Project of the returned point sets type : integer paramType : path required : true - name : simple description : Wheter or not only ID and name should be returned type : bool paramType : form required : false defaultValue : false - name : with_points description : Wheter linked points should returned as well . type : bool paramType : form required : false defaultValue : false - name : pointset_ids description : A list of point set IDs to which the query is constrained . type : array paramType : path required : false - name : order_by description : The field to order the response list by ( name id ) . type : string paramType : path required : false defaultValue : id
def get(self, request:HttpRequest, project_id) -> JsonResponse:
        """List all available point sets or optionally a sub set.
        ---
        parameters:
          - name: project_id
            description: Project of the returned point sets
            type: integer
            paramType: path
            required: true
          - name: simple
            description: Wheter or not only ID and name should be returned
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: with_points
            description: Wheter linked points should returned as well.
            type: bool
            paramType: form
            required: false
            defaultValue: false
          - name: pointset_ids
            description: A list of point set IDs to which the query is constrained.
            type: array
            paramType: path
            required: false
          - name: order_by
            description: The field to order the response list by (name, id).
            type: string
            paramType: path
            required: false
            defaultValue: 'id'
        """
        with_points = get_request_bool(request.query_params, 'with_points', False)
        simple = get_request_bool(request.query_params, 'simple', False)
        pointset_ids = get_request_list(request.query_params,
                'pointset_ids', None, map_fn=int)
        order_by = request.query_params.get('order_by', 'id')

        pointsets = list_pointsets(project_id, request.user.id, simple,
                with_points, pointset_ids, order_by)

        return JsonResponse(pointsets, safe=False)
def get ( self , request : HttpRequest , project_id ) -> JsonResponse : with_points = get_request_bool ( request . query_params , 'with_points' , False ) simple = get_request_bool ( request . query_params , 'simple' , False ) pointset_ids = get_request_list ( request . query_params , 'pointset_ids' , None , map_fn = int ) order_by = request . query_params . get ( 'order_by' , 'id' ) pointsets = list_pointsets ( project_id , request . user . id , simple , with_points , pointset_ids , order_by ) return JsonResponse ( pointsets , safe = False )