定制 lasselehtinen/issuu 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

lasselehtinen/issuu

Composer 安装命令:

composer require lasselehtinen/issuu

包简介

Issuu API client for PHP

README 文档

README

Latest Version Latest build

Issuu - API client for PHP

Notes

The version 3.0 is for the Issuu API v2. Old API was deprecated on May 1st, 2024.

Installation

You can install this package via composer using this command:

composer require lasselehtinen/issuu

Supported functionality

Drafts

Endpoint Supported
List drafts Yes
Create a new Draft Yes
Delete a Draft by slug Yes
Update a Draft by slug Yes
Upload a document for a Draft by slug Yes
Publish a Draft by slug Yes

Publications

Endpoint Supported
List Publications Yes
Get Publication by slug Yes
Delete Publication by slug Yes
Get Publication assets by slug No
Get Publication Fullscreen share by slug No
Get Publication Reader Share URL by slug No
Get Publication QRCode share by slug No
Get Publication Embed code by slug No

Stacks

Endpoint Supported
List Stacks Yes
Create a new Stack Yes
Get Stack data by ID Yes
Delete a Stack by ID Yes
Update Stack data by ID No
Get Stack Items slug Yes
Add Stack Item by slug to stack Yes
Delete Stack Item by slug from stack No

Stats

Endpoint Supported
Get Stats No

User

Endpoint Supported
Get User Profile No
Get User Features No

Usage

Creating a client

First create a new instance with your API key and secret:

use lasselehtinen\Issuu\Issuu;

$issuu = new Issuu('apiKey');
$drafts = new Drafts($issuu);

$body = [
    'confirmCopyright' => true,
    'fileUrl' => 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
    'info' => [
        'file' => 0,
        'access' => 'PUBLIC',
        'title' => 'Example title',
        'description' => 'Description',
        'preview' => false,
        'type' => 'editorial',
        'showDetectedLinks' => false,
        'downloadable' => false,
        'originalPublishDate' => '1970-01-01T00:00:00.000Z',
    ],
];

$createDraft = $drafts->create($body);

// Try few times until the file is converted
for ($i=0; $i < 10; $i++) {
    $draft = $drafts->getDraftBySlug($createDraft->slug);
    
    if ($draft->fileInfo->conversionStatus === 'DONE') {
        break;
    }

    sleep(2);
}

$publishDraftBySlug = $drafts->publishDraftBySlug($createDraft->slug, ['desiredName' => 'foobar']);

Contributing

Pull requests are welcome.

Pull Requests

  • Use PSR-2 Coding Standard.
  • Add tests! Your patch won't be accepted if it doesn't have tests.
  • Document any change in behaviour. Make sure the README.md and any other relevant documentation are kept up-to-date.
  • Send coherent history. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

Running Tests

$ phpunit

Issues

If you have problems or suggestions, please open a new issue in GitHub.

License

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

lasselehtinen/issuu 适用场景与选型建议

lasselehtinen/issuu 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.44k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2017 年 11 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 lasselehtinen/issuu 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lasselehtinen/issuu 我们能提供哪些服务?
定制开发 / 二次开发

基于 lasselehtinen/issuu 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-19