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

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

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

pnoeric/discourse-api-php

Composer 安装命令:

composer require pnoeric/discourse-api-php

包简介

Discourse API library for PHP

README 文档

README

This is a composer packaged version of the PHP library for accessing the Discourse API.

More about Discourse: https://www.discourse.org/

Discourse API docs: https://docs.discourse.org/

Features

  • Supports header-based authentication (required by Discourse as of April 2020)
  • Includes test suite for developers

Changelog

  • 2.1 - Fixing a nasty little bug

History

Originally as published by DiscourseHosting at https://github.com/discoursehosting/discourse-api-php.

With contributions from:

Many methods added and major refactor by Eric Mueller March/April 2020, now lives at https://github.com/pnoeric/discourse-api-php.

How to Use

Just include it with Composer: composer require pnoeric/discourse-api-php

And then:

// set up key in Discourse first - recommend system key for all users
$key = 'my-secret-discourse-api-key';
$hostname = 'forums.example.com';

$api = new \pnoeric\DiscourseAPI($hostname, $key);

// and you're off and running!
// look through the src/DiscourseAPI.php file for methods
// for example:
$results = $api->getTopTopics();

// if you aren't sure what the API returns from a call, just look at it:
$results = $api->getUserByDiscourseId( 1 );
var_dump($results);

// you can also get a lot of info from the tests (see tests/DiscourseApiTest.php).

For Developers

I'd love to see your changes and improvements to this library! Please feel free to submit a pull request, and please include a new test if you are adding/refactoring methods.

Testing

Setup

  1. Run composer install to install PHPUnit and other helper libraries
  2. Copy the .env.example file in the tests folder, change the name to .env and fill in the blanks

Running tests

In the terminal, from the root directory of this project, enter: ./vendor/bin/phpunit tests/DiscourseApiTest.php

pnoeric/discourse-api-php 适用场景与选型建议

pnoeric/discourse-api-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.01k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2020 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「discourse」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 pnoeric/discourse-api-php 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2020-04-29