Download the PHP package nieknijland/ista-php without Composer

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

Ista PHP

Latest Version on Packagist Tests Total Downloads

PHP client for the Ista energy consumption API at mijn.ista.nl. Framework-agnostic.

Requires PHP 8.4+.

Installation

Quick start

Constructor

Parameter Type Default Description
$username string (required) Your mijn.ista.nl username
$password string (required) Your mijn.ista.nl password (marked #[SensitiveParameter])
$httpClient ?ClientInterface null Custom Guzzle HTTP client; null creates a default one
$cache ?CacheInterface null Any PSR-16 cache implementation; null disables caching
$cacheTtl int 3600 Cache time-to-live in seconds

API methods

The client provides four methods. All throw IstaException on failure.

Method Description
getUserValues() Fetch all customers, meters, and billing data
getConsumptionAverages() Fetch building average consumption
getMonthlyConsumption() Fetch month-by-month consumption history
getConsumptionValues() Fetch consumption for a specific billing period

See API Methods for full parameter documentation and examples.

Data objects

All API responses are returned as readonly DTOs with typed properties. Every DTO provides fromArray() and toArray() for serialization.

Class Description
UserValuesResult Top-level response with customers
Customer A customer with address and consumption data
ConsumptionPeriod A billing period with services, meters, and temperatures
ServiceComparison Current vs. previous year totals for a service type
Meter A single meter reading with all technical fields
BillingService Service type definition (e.g. Heating, Hot Water)
BillingPeriod A billing year with start/end dates
ConsumptionAverageResult Building average consumption
ConsumptionValuesResult Consumption data for a specific billing period
MonthlyConsumptionResult Monthly consumption history
MonthlyConsumption A single month's consumption
MonthlyServiceConsumption Per-service totals for a month
MonthlyDeviceConsumption Per-device readings for a month

See Data Objects for all properties and types.

Caching

Pass any PSR-16 CacheInterface to cache API responses and the JWT token:

Cache keys used:

Key pattern Data
ista:jwt Authentication token
ista:user-values getUserValues() response
ista:consumption-averages:{cuid}:{start}:{end} getConsumptionAverages() response
ista:monthly-consumption:{cuid} getMonthlyConsumption() response
ista:consumption-values:{cuid}:{year}:{start}:{end} getConsumptionValues() response

Cache failures are silently ignored -- the client will re-fetch from the API.

Error handling

All errors are wrapped in a single exception class:

Testing

The package ships testing utilities so you can mock the Ista client in your application tests without making real API calls.

See Testing for full documentation of FakeIsta, all factories, and recorded call inspection.

Development

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of ista-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.0
psr/simple-cache 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 nieknijland/ista-php contains the following files

Loading the files please wait ...