(self, per_page=50, scope='user', include_archived=True)
Get a list of all open sketches that the user has access to.

        Args:
            per_page: Number of items per page when paginating. Default is 50.
            scope: What scope to get sketches as. Default to user.
                user: sketches owned by the user
                recent: sketches that the user has actively searched in
                shared: Get sketches that can be accessed
                admin: Get all sketches if the user is an admin
                archived: get archived sketches
                search: pass additional search query
            include_archived: If archived sketches should be returned.

        Yields:
            Sketch objects instances.
Get a list of all open sketches that the user has access to.
Get a list of all open sketches that the user has access to .
def list_sketches(self, per_page=50, scope='user', include_archived=True):
        """Get a list of all open sketches that the user has access to.

        Args:
            per_page: Number of items per page when paginating. Default is 50.
            scope: What scope to get sketches as. Default to user.
                user: sketches owned by the user
                recent: sketches that the user has actively searched in
                shared: Get sketches that can be accessed
                admin: Get all sketches if the user is an admin
                archived: get archived sketches
                search: pass additional search query
            include_archived: If archived sketches should be returned.

        Yields:
            Sketch objects instances.
        """
        url_params = {
            'per_page': per_page,
            'scope': scope,
            'include_archived': include_archived
        }
        # Start with the first page
        page = 1
        has_next_page = True

        while has_next_page:
            url_params['page'] = page
            response = self.fetch_resource_data('sketches/', params=url_params)
            meta = response.get('meta', {})

            page = meta.get('next_page')
            if not page:
                has_next_page = False

            for sketch_dict in response.get('objects', []):
                sketch_id = sketch_dict['id']
                sketch_name = sketch_dict['name']
                sketch_obj = sketch.Sketch(
                    sketch_id=sketch_id, api=self, sketch_name=sketch_name)
                yield sketch_obj
def list_sketches ( self , per_page = 50 , scope = 'user' , include_archived = True ) : url_params = { 'per_page' : per_page , 'scope' : scope , 'include_archived' : include_archived } # Start with the first page page = 1 has_next_page = True while has_next_page : url_params [ 'page' ] = page response = self . fetch_resource_data ( 'sketches/' , params = url_params ) meta = response . get ( 'meta' , { } ) page = meta . get ( 'next_page' ) if not page : has_next_page = False for sketch_dict in response . get ( 'objects' , [ ] ) : sketch_id = sketch_dict [ 'id' ] sketch_name = sketch_dict [ 'name' ] sketch_obj = sketch . Sketch ( sketch_id = sketch_id , api = self , sketch_name = sketch_name ) yield sketch_obj