定制 whatpulse/api-sdk-php 二次开发

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

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

whatpulse/api-sdk-php

最新稳定版本:1.0.0

Composer 安装命令:

composer require whatpulse/api-sdk-php

包简介

Public API for WhatPulse user data access. This API allows authenticated users to access their own data and public data from other users, depending on privacy settings.

README 文档

README

Public API for WhatPulse user data access. This API allows authenticated users to access their own data and public data from other users, depending on privacy settings.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, run:

composer require whatpulse/api-sdk-php

API Key

To use the WhatPulse API, you'll need an API key. You can generate one by visiting: https://whatpulse.org/go/settings-api-keys

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer authorization: http
$config = WhatPulse\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new WhatPulse\Api\ComputersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | User ID or username
$is_archived = 'is_archived_example'; // string | Get filter parameters

try {
    $result = $apiInstance->v1UsersComputers($id, $is_archived);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ComputersApi->v1UsersComputers: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://whatpulse.org/api/v1

Class Method HTTP request Description
ComputersApi v1UsersComputers GET /users/{id}/computers Get user computers
MembersApi v1TeamsMembers GET /teams/{team_id}/members Get team members
ProfilesApi v1UsersProfiles GET /users/{id}/profiles Get user profiles
PulsesApi v1UsersPulses GET /users/{id}/pulses Get user pulses
SubteamMembersApi v1TeamsSubteamsMembers GET /teams/{team_id}/subteams/{subteam_id}/members Get subteam members
SubteamsApi v1TeamsSubteams GET /teams/{team_id}/subteams Get team subteams
SubteamsApi v1TeamsSubteamsShow GET /teams/{team_id}/subteams/{subteam_id} Get subteam details
TeamsApi v1TeamsIndex GET /teams Search teams
TeamsApi v1TeamsShow GET /teams/{team_id} Get team details
TimeSeriesApi v1UsersTimeSeries GET /users/{id}/time-series Get user time series
UsersApi v1UsersIndex GET /users Search users
UsersApi v1UsersShow GET /users/{id} Get user details

Models

Authorization

Authentication schemes defined for the API:

http

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
    • Package version: 1.0.0
    • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-09