About Yet Another Shopify PHP API (yaspa)

Purpose

Most Shopify APIs appear to be thin wrappers around Guzzle that makes things slightly more convenient but still makes it feel like you are interacting with a REST API.

The goal of this project is to go one step beyond and provide something closer to a SDK whereby the library offers everything through PHP without the developer needing to think too much about the REST API.

For sample code, see the examples overview.

Project objectives, opinions

  • Be truthful to the original API, do not rename, restructure, or otherwise modify terms where possible
  • Offer different levels of abstraction so that the user can utilise lower-level library classes if desired
  • Work with native models where possible
  • Promises first, embrace async support in Guzzle
  • If a method accepts more than 3 parameters, use a builder
  • Minimise the number of dependencies

Reading this book

Given the core objective of staying true to the Shopify API docs, most of this book is structured as closely to the Shopify docs as possible. The idea is that for any Shopify documentation section, one can navigate to an equivalent section in this book to see the Yaspa version of how to make the same API call.

Although not mentioned, the library itself does contain versions of methods that accept native methods, however, staying true to Shopify's documentation means that ...ById(...) methods are used in examples where available.

results matching ""

    No results matching ""