承接 soramugi/google-drive-client-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

soramugi/google-drive-client-php

Composer 安装命令:

composer require soramugi/google-drive-client-php

包简介

README 文档

README

Build Status

The php library to Google Drive API operate. The wrapper which uses the library based on the following library.

https://github.com/bitgandtter/google-api based on http://code.google.com/p/google-api-php-client/

Installation

Using Composer

composer.json

{
    "require": {
        "soramugi/google-drive-client-php": "*"
    }
}
curl -s http://getcomposer.org/installer | php
php composer.phar install

Usage

Attestation

<?php
require_once __DIR__ . '/vendor/autoload.php';

$client = new Soramugi\GoogleDrive\Client;

$client->setClientId('your client id');
$client->setClientSecret('your client secret');

$token = '{"access_token":"your_access_token","token_type":"Bearer","expires_in":3600,"refresh_token":"your_refresh_token","created":0000000000}';
$client->setAccessToken($token);

get client id or client secret.

https://code.google.com/apis/console/

get json type string access_token.

https://gist.github.com/soramugi/6060776

List display

<?php
$files = new Soramugi\GoogleDrive\Files($client);

foreach ($files->listFiles()->getItems() as $item) {
    if (!$item->getLabels()->getTrashed()) {
        echo "file : {$item->getTitle()}\n";
        echo "{$item->getId()}\n";
    }
}

Add Spreadsheet

$file = new Soramugi\GoogleDrive\Spreadsheet();
$file->setClient($client);
$file->setTitle('test file '. time());
$file->setDescription('test description');

$data = "foo,var\nhi";
$createdFile = $file->insert($data);
echo $createdFile->getTitle() . "\n";

When adding into folder, id of forder file is set up.

$file->setParentId($folderId);

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Apache License, Version 2.0

统计信息

  • 总下载量: 9.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 3
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: Apache
  • 更新时间: 2013-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固