承接 lasselehtinen/issuu 相关项目开发

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

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

lasselehtinen/issuu

最新稳定版本:v4.0

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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固