code to fetch folder items using limit and offset