PHPackages                             smallhay/smallhay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smallhay/smallhay

ActiveLibrary[API Development](/categories/api)

smallhay/smallhay
=================

The Small Hay API SDK.

v1.0.1(6y ago)05GPL-2.0PHPPHP &gt;=7.1.0

Since Jan 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/small-hay/smallhay)[ Packagist](https://packagist.org/packages/smallhay/smallhay)[ Docs](https://www.smallhay.com/)[ RSS](/packages/smallhay-smallhay/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Smallhay API SDK
================

[](#smallhay-api-sdk)

- This SDK requires an account with Small Hay - .
- Up to date documentation can be found on the API site - .

Functions
=========

[](#functions)

Authentication
--------------

[](#authentication)

- get\_auth() -

Pages
-----

[](#pages)

- create\_pages() -
- delete\_pages() -
- get\_pages() -
- update\_pages() -

Page
----

[](#page)

- delete\_page() -
- get\_page() -
- modify\_page() -

Page Assets
-----------

[](#page-assets)

- create\_page\_assets() -
- delete\_page\_assets() -
- get\_page\_assets() -
- update\_page\_assets() -

Page Asset
----------

[](#page-asset)

- delete\_page\_asset() -
- get\_page\_asset() -
- modify\_page\_asset() -

Sample Code
===========

[](#sample-code)

There is no need to authenticate manually as each call to the API will check to see if there is a valid bearer token before sending the payload.

```
// Instantiate the SDK. The final arg is boolean flag to specify which
// environment to make API calls against. If it is set to TRUE, the API calls
// will hit the test environment, otherwise it will hit the prod environment.
$smallhay = new \SmallHay\API(CLIENT_ID, CLIENT_SECRET, TEST);
```

Pages will need to be created. Pages are arbitrary identifiers and loosely represent paths.

```
// Create pages via the API.
$response = $smallhay->create_pages(json_encode(['path1', 'path2']));
```

Additional information can be added to the path if the path itself is not enough to uniquely identify a page. For example, if the same path can display multiple languages, construct the paths like so.

```
// Create pages via the API. Note, the language codes.
$response = $smallhay->create_pages(json_encode(['en:path1', 'fr:path1']));
```

Create a page asset via the API. Currently the API only supports Javascript.

```
// Create a page asset. Input must always be base 64 encoded as the API expects
// that format and will error if the string is not base 64 encoded.
$asset = new stdClass();
$asset->data_type = 'javascript';
$asset->type = 'file';
$asset->input = base64_encode('https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js');

// Create page assets via the API. The first arg is the page id.
$response = $smallhay->create_page_assets(1, json_encode(array($asset)));
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~93 days

Total

2

Last Release

2228d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2086022?v=4)[Scott Joudry](/maintainers/sjoudry)[@sjoudry](https://github.com/sjoudry)

---

Top Contributors

[![sjoudry](https://avatars.githubusercontent.com/u/2086022?v=4)](https://github.com/sjoudry "sjoudry (33 commits)")

---

Tags

smallhay

### Embed Badge

![Health badge](/badges/smallhay-smallhay/health.svg)

```
[![Health](https://phpackages.com/badges/smallhay-smallhay/health.svg)](https://phpackages.com/packages/smallhay-smallhay)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
