djamadeus/google-spreadsheet-api2

Google Spreadsheets API 3.0

0.1.0 2013-09-10 19:54 UTC

This package is not auto-updated.

Last update: 2024-10-02 05:05:36 UTC


README

Google Spreadsheet API 3.0的实现

Build Status

状态

这还是一个工作进度(WIP)。请注意,直到1.0.0版本发布之前,一切都可以改变。目前只实现了数据读取功能。

授权

该库仅使用OAuth 2.0授权方法进行了测试。

确保访问令牌有效是你的责任。客户端不会自动刷新令牌。

基本用法

<?php

// Instantiate the Google client.
// You need a valid access key and the Buzz browser for HTTP requests.
$client = new \Wunderdata\Google\Client($accessKey, $buzz);

// Get a list of all spreadsheets
$spreadsheets = $client->loadSpreadsheets();

// Load all worksheets from the first spreadsheet in the list
$worksheets = $client->loadWorksheets($spreadsheets[0]);

// Load the cell feed for the first worksheet in the list
$cellFeed = $client->loadCellFeed($worksheets[0]);

// Get content from cell B3
$b3 = $cellFeed->findCell('B3');

有关认证的官方文档,请参阅此处