Download the PHP package stevecomrie/baserow-php without Composer

On this page you can find all versions of the php package stevecomrie/baserow-php. 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 baserow-php

Baserow PHP client

A PHP client for the Baserow.io API with human readable table and field names.

Comments, requests or bug reports are appreciated.

Getting started

This library only manages CRUD operations using the Baserow API.

It can be used with both the SaaS hosted and self hosted versions.

For more information about the Baserow API, please see:


Installation

If you're using Composer, you can run the following command:

You can also download the src files directly and extract them to your web directory.

Add the client to your project

If you're using Composer, run the autoloader

Or include the Baserow.php file

Initialize the class

Only the api_key parameter is required, the rest are added as a reference.

You can create your API key through your Baserow.io dashboard.

Creating a human readable table map

Baserow uses incrementing integers for names when creating new tables and fields.

For example, tables are given IDs like:

And fields within a table are given names like:

This is obviously not ideal for long-term code readability and maintenance, but totally understandable given the current stage of Baserow development.

To make developer life a littler easier, you can configure a table_map parameter when creating a new instance of the Baserow client that lets you map these auto-generated IDs to human readable names.

Sample table map

This is what a sample table map configuration might look like.

You can find the table and field IDs generated by Baserow using the API documentation for your database.

When you initialize the Baserow client with a table_map you are able to use your new human readable names anywhere that you would have previously used a table #### or field_####.

The table_map parameter is optional, but the rest of the examples in this document will assume that you're using it.

Table map recommendations

You probably don't want to use spaces in your human readable field names.

Your table map configuration will need to be manually updated if you add or remove fields.

In addition to maintaining your sanity when writing code, the table map configuration also make it possible to create a staging / production environment using two separate databases, each with their own table map.

Communicating with the API

Retrieving a "page" of records from a table

Get entries from the table "Contacts".

Using $params to filter & sort records

You don't have to use all the params, they are added as a reference.

The full list of available parameters for use with the list() or all() functions can be found within the API documentation that is automatically generated by Baserow for your database.

Retrieving ALL records within a table

If you need to return more than a single page of results, you can use the all() function to automatically retrieve the entire paginated result set.

Creating a new record

We will create new entry in the table Contacts

Updating an existing record

Use the row ID to update the entry

Deleting a record

Use the row ID to delete the entry

Accessing API error messages

Any time an API operation fails, you can access the reason for the failure using the error() function.

Credits

Copyright (c) 2021 - Programmed by Steve Comrie.

Thanks to Bram Wiepjes for developing Baserow.io and to Sleiman Tanios whose Airtable API Client this library borrows from substantially.


All versions of baserow-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 stevecomrie/baserow-php contains the following files

Loading the files please wait ....