Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 588 Bytes

trees.md

File metadata and controls

25 lines (21 loc) · 588 Bytes

Trees API

Back to the navigation

Show a tree

$tree = $client->api('gitData')->trees()->show('KnpLabs', 'php-github-api', '839e5185da9434753db47959bee16642bb4f2ce4');

Create a tree

$treeData = [
    'base_tree' => '839e5185da9434753db47959bee16642bb4f2ce4',
    'tree' => [
        [
            'path' => 'README.md',
            'mode' => '100644',
            'type' => 'blob',
            'content' => 'Updated Readme file'
        ]
    ]
];
$tree = $client->api('gitData')->trees()->create('KnpLabs', 'php-github-api', $treeData);