PHPackages                             divinityfound/googledrivetree - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. divinityfound/googledrivetree

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

divinityfound/googledrivetree
=============================

Compiles into an array a Google Drive Folder into a treelike structure.

0131PHP

Since Oct 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/MathisonProjects/googleDriveTree)[ Packagist](https://packagist.org/packages/divinityfound/googledrivetree)[ RSS](/packages/divinityfound-googledrivetree/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\##Google Drive Tree ###Google Drive to an Array Tree

This solution was developed to make it easier for developers to figure out the entirety of the Google Drive file map for public or private use.

\###Google Setup

1. Visit
2. Create a project.
3. On the menu on the left, expand "APIs &amp; auth", select APIs
4. Select under Google Apps APIs, Drive API
5. Enable API
6. On the menu on the left under "APIs &amp; auth", select Credentials
7. Under OAuth, click "Create new Client ID"
8. Click Service Account, select P12 Key
9. Store your P12 Key somewhere safe
10. Visit
11. Click "Security". It may be under Show More.
12. Click Show More when in Security, click Advanced Settings.
13. Click Manage "API client access"
14. Insert Service Account's Client Id under Client Name, insert into API Scope ""
15. Your API is now set up!

\###Code

```
	require_once(__DIR__ . '/../vendor/autoload.php');

	$params = array();
	$params['client_id']            = 'xyz.apps.googleusercontent.com';
	$params['service_account_name'] = 'xyz@developer.gserviceaccount.com';
	$params['key']                  = 'your_directory.P12';
	$params['sub']                  = 'youremail@example.com';
	$params['drive']				= 'drive_folder';

	$data = new \Divinityfound\GoogleDriveTree\Processor($params);

	echo '';
	print_r($data->file_tree);
	echo '';
	exit;
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/12566b2564f3af043bbc5f4fa902c82913eb984ed23f8b675d168001898fc0e7?d=identicon)[MathisonProjects](/maintainers/MathisonProjects)

### Embed Badge

![Health badge](/badges/divinityfound-googledrivetree/health.svg)

```
[![Health](https://phpackages.com/badges/divinityfound-googledrivetree/health.svg)](https://phpackages.com/packages/divinityfound-googledrivetree)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
