Download the PHP package tomgould/puzzlerphpsdk without Composer

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

PuzzlerPHPSDK

A PHP SDK for the Puzzler Media REST API.

Unofficial client. This library is not affiliated with or endorsed by Puzzler Media. You need your own API credentials (client ID, API key and secret key), which are issued by Puzzler.

PHP Version

Installation

Install via Composer:

Requirements

Quick Start

Usage

Initialize Client

Health Check

Get Puzzle Dictionary

The dictionary endpoint returns all available puzzle types and names from the latest bundle.

Example response:

Collect Puzzles

Get all puzzles from the latest bundle

Filter by specific date

Note: Date must be in YYYY-MM-DD format. The API returns puzzles from the latest bundle, so requesting dates outside the bundle's range will return empty results.

Filter by date range

Filter by puzzle types

Available puzzle type abbreviations:

Filter by puzzle names

When filtering by puzzle names, you can specify exact puzzle names. If you want only specific puzzle variants (e.g., only "Easy Sudoku"), do NOT include that puzzle type in puzzleTypes, otherwise all puzzles of that type will be returned.

Combine multiple filters

Practical Examples

Get today's wordsearches:

Get all sudoku variants for a date range:

Build a weekly puzzle archive:

Error Handling

The SDK throws specific exceptions for different error types:

API Reference

PuzzlerClient

Main client class for accessing the API.

Constructor

Methods

PuzzleClient

Client for puzzle-related operations.

Methods

Collect Filters

Parameter Type Required Format Description
puzzleDate string No YYYY-MM-DD Exact date to filter by
puzzleDateFrom string No YYYY-MM-DD Start date for range filter
puzzleDateTo string No YYYY-MM-DD End date for range filter
puzzleTypes array No Array of strings Puzzle type abbreviations
puzzleNames array No Array of strings Exact puzzle names

HealthClient

Client for health check operations.

Methods

Exception Hierarchy

Troubleshooting

No puzzles returned when filtering by date

Problem: You're filtering by a specific date but getting an empty array back, even though puzzles should exist.

Possible causes:

  1. Date is outside the bundle range: The API only returns puzzles from the "latest bundle". If you request a date that's not in the current bundle, you'll get no results.
  2. Date format is incorrect: Ensure you're using YYYY-MM-DD format (e.g., '2025-11-12', not '11/12/2025')
  3. No puzzles published for that date: Some dates may not have puzzles available

Solution:

Building a puzzle archive

Problem: You need to archive puzzles from multiple days/weeks/months, but the API only provides the "latest bundle".

Solution: You'll need to implement a cron job or scheduled task that regularly fetches and stores puzzles:

Authentication errors

Problem: Getting 401 Authentication Failed errors.

Possible causes:

  1. Incorrect credentials: Double-check your Client ID, API Key, and Secret Key
  2. Clock skew: The API signature is time-sensitive (valid for 5 minutes). Ensure your server's clock is synchronized

Solution:

Filter by puzzle name not working

Problem: You're filtering by puzzle name but getting all puzzles of that type.

Cause: When using puzzleNames, you must NOT include the corresponding puzzle type in puzzleTypes, otherwise the API returns all puzzles of that type.

Incorrect:

Correct:

Empty results with valid filters

Problem: You're certain your filters should match puzzles, but you're getting an empty array.

Debug steps:

API Quirks and Technical Notes

Request Body Format

The Puzzler API has an unusual requirement for the request body format:

This SDK handles this automatically, so you don't need to worry about it.

Date Filtering Behavior

The API operates on the "latest bundle" concept:

Signature Validity

Authentication signatures are valid for 5 minutes from generation. The SDK generates a fresh signature for each request, so this shouldn't be an issue unless you have extreme clock skew.

Testing

Setup

  1. Copy the environment example file:

  2. Edit .env and add your credentials:

  3. Load environment variables:

Run Tests

Run all tests:

Run only unit tests (no credentials required):

Run only integration tests (credentials required):

Test your credentials specifically:

Run with coverage:

Test Structure

License

MIT License - see LICENSE file for details

Author

Tom Gould

Repository

https://github.com/tomgould/PuzzlerPHPSDK

Support

For issues, questions, or contributions, please visit the GitHub repository.


All versions of puzzlerphpsdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
ext-json Version *
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 tomgould/puzzlerphpsdk contains the following files

Loading the files please wait ...