beyondcode/fathom-api

此包已被废弃,不再维护。未建议替代包。

Fathom 分析 API

1.1.0 2021-07-12 12:26 UTC

This package is auto-updated.

Last update: 2024-01-12 19:45:00 UTC


README

这是一个非官方的 PHP SDK,用于从 Fathom 分析中获取统计数据,只要它不提供官方 API。

安装

您可以通过 composer 安装此包

composer require beyondcode/fathom-api

用法

$analytics = new BeyondCode\FathomAnalytics($email, $password);

$sites = $analytics->getSites();

$analytics->getCurrentVisitors($siteId);

// Returns the visitor data for today
$analytics->getData($siteId);

// Returns the visitor data for the whole week until today
$analytics->getData($siteId, Carbon::now()->startOfWeek());

// Returns the visitor data for two days ago until yesterday.
$analytics->getData($siteId, Carbon::now()->subDays(2), Carbon::now()->subDays(1));

变更日志

请参阅 CHANGELOG 了解最近更改的详细信息。

贡献

请参阅 CONTRIBUTING 了解详细信息。

安全性

如果您发现任何安全相关的问题,请通过电子邮件 marcel@beyondco.de 而不是使用问题跟踪器。

鸣谢

许可证

MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。