如何使用谷歌驱动器服务检索文件夹

I want to retrieve a folder with Google drive Service. The first problem is that I do not know the folder Id. I only know the folder name that is in my drive.

The second problem is that I only find this snippet of code for downloading file and not folder https://developers.google.com/drive/web/manage-downloads

Here is the beginning of my code, but it does not work :(

session_start();

define( 'GDRIVE_CLIENT_ID', '422321818234bg877v326qtojhcsgsqr6p7fd563jmmh.apps.googleusercontent.com' ); 
define( 'GDRIVE_CLIENT_SECRET', '1V5ADb4CpMZZqdSHfsORWro1' ); 
define( 'GDRIVE_REDIRECT_URIS', 'http://localhost/drive.php' ); 

define( 'GDRIVE_SCOPE_01', 'https://www.googleapis.com/auth/drive' ); 
define( 'GDRIVE_SCOPE_02', 'https://www.googleapis.com/auth/drive.apps.readonly' ); 
define( 'GDRIVE_SCOPE_03', 'https://www.googleapis.com/auth/drive.file' ); 
define( 'GDRIVE_SCOPE_04', 'https://www.googleapis.com/auth/drive.metadata.readonly' ); 
define( 'GDRIVE_SCOPE_05', 'https://www.googleapis.com/auth/drive.readonly' ); 
define( 'GDRIVE_FILE_KEY', 'https://drive.google.com/folderview?id=0B_S8U3a8QeR_cUlCRTBLOWxiUnc&usp=sharing' ); 

$client = new Google_Client(); 
$client->setClientId( GDRIVE_CLIENT_ID ); 
$client->setClientSecret( GDRIVE_CLIENT_SECRET ); 
$client->setRedirectUri( GDRIVE_REDIRECT_URIS ); 
$client->setScopes( array( GDRIVE_SCOPE_01, GDRIVE_SCOPE_02, GDRIVE_SCOPE_03, GDRIVE_SCOPE_04, GDRIVE_SCOPE_05 ) ); 


if (isset($_GET['code']) || (isset($_SESSION['access_token']) && $_SESSION['access_token'])) {
    if (isset($_GET['code'])) {
        $client->authenticate($_GET['code']);
        $_SESSION['access_token'] = $client->getAccessToken();
    } else
        $client->setAccessToken($_SESSION['access_token']);

    $service = new Google_Service_Drive($client);
} else {
    $authUrl = $client->createAuthUrl();
    header('Location: ' . $authUrl);
    exit();
}

try { 
  $file = $service->files->get( GDRIVE_FILE_KEY ); 
  echo "Title: ", $file->getTitle(); 
  echo "Description: ", $file->getDescription(); 
  echo "MIME type: ", $file->getMimeType(); 
} catch (Exception $e) { 
  echo "An error occurred: ", $e->getMessage(); 
} 

"The first probleme is that I do not know the folder Id. I only know the folder name that is in my drive."

Do a files.list with a query containing the file name. See https://developers.google.com/drive/v2/reference/files/list and https://developers.google.com/drive/web/search-parameters