public function getSnippets() {
        $response=CodeBank_ClientAPI::responseBase();
        
        //Ensure logged in
        if(!Permission::check('CODE_BANK_ACCESS')) {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
            
            return $response;
        }
        
        
        $languages=SnippetLanguage::get();
        foreach($languages as $lang) {
            if($lang->Snippets()->Count()>0) {
                $snippets=$this->overviewList($lang->Snippets()->filter('FolderID', 0), 'Title', 'ID', 'LanguageID');
                
                $response['data'][]=array(
                                        'id'=>$lang->ID,
                                        'language'=>$lang->Name,
                                        'folders'=>$this->mapFolders($lang->Folders()),
                                        'snippets'=>$snippets
                                    );
            }
        }
        
        
        return $response;
    }