Download the PHP package rashiku/colrow-php-sdk without Composer

On this page you can find all versions of the php package rashiku/colrow-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package colrow-php-sdk

COLROW PHP SDK

COLROW PHP SDK は、PHP 環境にて COLROW API を利用するための SDK です。

インストール方法

Composer を使います。まずはプロジェクトのルートディレクトリにて、以下の composer.json を作成し、php composer.phar install を実行してください。

以下のように記述することで COLROW PHP SDK が利用できるようになります。

何らかの事情で Composer が使えない場合は、ファイル一式をダウンロードし、Colrow フォルダをそのままお使いください。上記の autoload.php の代わりに以下のように記述し、必要なファイル群を読み込んでください。

※PHP のバージョンは 5.4 以上である必要があります。

初期化

SDK から必要なファイルを読み込んだ後、ColrowClient を初期化する必要があります(ColrowDrive だけは例外)。

3つの引数はそれぞれ「COLROW に登録した Google アカウント」「スプレッドシートの key」「ワークシート名」になります。

基本的な使い方

利用する機能に応じたクラスを use 文にて宣言します。大抵のケースでは、以下の3つのクラス(のうちいずれか)を宣言することになるでしょう。

オブジェクトとして全件取得

最初の1件を取得

クエリ(後述)を指定して取得

件数をカウント

シートに新しい行を追加

行の内容を更新

行を削除

COLROW オブジェクト

ColrowQuery クラス経由で取得したオブジェクトは、get メソッドによって内容を参照できます。

その他にも、以下のメソッドが利用可能です。

クエリ

シートの内容を抽出するため、ColrowQuery クラスのインスタンスに対して、SQL の where 句に相当する以下のメソッドが用意されています。

上記の条件を複数列記することで AND として扱われます。

OR の場合は ColrowQuery のインスタンスを個別に作成し、orQuery メソッドを使います。

その他にも以下のメソッドが利用可能です。

ColrowDrive について

Google ドライブにファイルをアップロードするために用意された ColrowDrive クラスは、前述した他のクラスとはやや使用感が異なります。

$parent_id はファイルのアップロード先、つまり Google ドライブのフォルダの ID になります。そのフォルダのページの URL の https://drive.google.com/drive/u/0/folders/ 以降に書かれているのがそれです。また、ColrowDrive::upload() の第1引数には、COLROW に登録した Google アカウントを指定してください。


All versions of colrow-php-sdk with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rashiku/colrow-php-sdk contains the following files

Loading the files please wait ....