Download the PHP package dealnews/datocms-cma-client without Composer

On this page you can find all versions of the php package dealnews/datocms-cma-client. 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 datocms-cma-client

datocms-cma-client

Unofficial DatoCMS API Client for the Content Management API

Usage

Initialize the client:

Records/Items

Get a list of records/items

Get a filtered list of records/items

Creating and Updating Records

You can create/update records in three ways:

Option 1: Using the Record Input Class with DataTypes

This approach provides type safety and validation, but it is incomplete. Structured-Text is the big missing piece.

Option 2: Using the Record Input Class with Plain Arrays

You can use the Record class but populate attributes with arrays:

Option 3: Using a Plain Array

You can still pass a plain array directly:

Available DataTypes Classes

The library provides the following DataTypes classes for structured field values:

All DataTypes support localization via the addLocale() method for multilingual content.


Models (Item-Types)

Models define the content types in your DatoCMS project. The DatoCMS API refers to these as "item-types".

Get a list of models:

Get a specific model by ID:

Create a new model:

Update a model:

Delete a model:

Duplicate a model:

Model Attributes

Common model attributes include:

Attribute Type Description
name string Human-readable name
api_key string Machine-friendly key
singleton bool Single-instance model
sortable bool Allow manual record sorting
modular_block bool Is a block model
tree bool Hierarchical records
draft_mode_active bool Enable drafts
all_locales_required bool Require all locales
ordering_direction string asc or desc
collection_appearance string compact or table
hint string Editor hint text

Uploads

The library provides a complete Upload API for managing media assets in DatoCMS.

Upload a File

The simplest way to upload a file is with the uploadFile() helper method:

Upload from URL

Upload a file directly from a remote URL:

List and Filter Uploads

Upload Collections (Folders)

Organize uploads into folders:

Upload Tags

Manage user-defined tags for uploads:

Smart Tags

List auto-detected smart tags (read-only):

Bulk Operations

Manual Upload Flow

For advanced use cases, you can use the low-level upload flow:


All versions of datocms-cma-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.10
moonspot/value-objects Version ^2.3
psr/log Version ^3.0
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 dealnews/datocms-cma-client contains the following files

Loading the files please wait ...