承接 laposta/laposta-api-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laposta/laposta-api-php

最新稳定版本:2.0.1

Composer 安装命令:

composer require laposta/laposta-api-php

包简介

Laposta api, free api to laposta.nl

README 文档

README

Build Coverage Packagist Version PHP Version License

A PHP library for interacting with the Laposta API, compatible with PSR-18 and PSR-17 standards.

Requirements

To use the Laposta API, the following is required:

  • PHP >= 8.1
  • cURL PHP extension
  • JSON PHP extension

Composer Installation

The easiest way to install this library is by requiring it via Composer:

composer require laposta/laposta-api-php

Manual Installation

If you're not using Composer, include the autoloader:

require_once("/path/to/laposta-api-php/standalone/autoload.php");

Quick Example

$laposta = new LapostaApi\Laposta('your_api_key');
$member = $laposta->memberApi()->create($listId, ['email' => 'test@example.com', 'ip' => '123.123.123.123']);

Examples

This project includes a set of real, runnable examples organized by API resource (e.g., list, campaign, member).
Each example demonstrates a specific API operation and can be run via PHP CLI.
See examples/README.md for setup instructions and an overview of the available examples.

Extensibility

This library is built around PHP standards (PSR-18/17) and is designed to be flexible.
You can inject your own HTTP client and factories (e.g. Guzzle, Nyholm, Symfony components) via the constructor:

$laposta = new LapostaApi\Laposta(
    'your_api_key',
    httpClient: new \GuzzleHttp\Client(), // implements PSR-18
    requestFactory: ...,
    responseFactory: ...,
    streamFactory: ...,
    uriFactory: ...
);

If no client or factories are provided, the library uses its own lightweight implementations by default.

API Documentation

For the full API reference, see https://api.laposta.nl/doc.

Changelog

See CHANGELOG.md for a complete list of changes.

License

This library is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 60.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 4
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-02