From f40c924e312556565c809c8bba42a11b12410e13 Mon Sep 17 00:00:00 2001 From: George Steel Date: Wed, 1 Sep 2021 11:50:33 +0100 Subject: [PATCH] Ready readme and changelog for initial release --- CHANGELOG.md | 4 ++-- README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06f32eb..40b730d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,11 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 0.1.0 - TBD +## 0.1.0 - 2021-09-01 ### Added -- Nothing. +- Everything. ### Changed diff --git a/README.md b/README.md index 5a0caba..a9ed01b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PHP Template Repository +# Prismic Document Type API Client [![Build Status](https://github.com/netglue/prismic-doctype-client/workflows/Continuous%20Integration/badge.svg)](https://github.com/netglue/prismic-doctype-client/actions?query=workflow%3A"Continuous+Integration") @@ -10,11 +10,53 @@ ## Introduction -This is a template repo. +This library provides an API client so that you can read and write your document type definitions using the [Prismic Custom Types API](https://prismic.io/docs/technologies/custom-types-api). + +Currently, you can list, read, insert and update document types. + +The client requires that you make use of _(And similarly, it returns instances of)_ the shipped `Definition` value object. + +Typically, you wouldn't interact with the client directly, but as part of a build process that takes care of all that stuff for you. This client is quite fresh, but it's primary use will soon be part of [`netglue/prismic-cli`](https://github.com/netglue/prismic-cli), so that it will become trivial to synchronise your local development document definitions with those in your production Prismic repository _(and vice-versa)_. ## Installation -This is a template repo. +The only supported installation method is via composer: + +```shell +composer require --dev netglue/prismic-doctype-client +``` + +## Configuration + +The client has been designed to work with whatever [PSR-18 HTTP Client](https://packagist.org/providers/psr/http-client-implementation) and [PSR-7 and PSR-17 implementations](https://packagist.org/providers/psr/http-factory-implementation) that you like to use. Once you have got hold of an API token for the custom types API, you can create a client with: + +```php +