承接 touchstorm/youtube-subscriber-parser 相关项目开发

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

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

touchstorm/youtube-subscriber-parser

Composer 安装命令:

composer require touchstorm/youtube-subscriber-parser

包简介

Parse YouTube subscriber counts into usable integers

README 文档

README

Parsing YouTube subscriber counts into usable integers.

In May of 2019 YouTube announced an update that would affect subscriber counts on their YouTube Data API. This update would adjust the full integer formatting of subscriber counts (673335), found in the API responses, to match the abbreviated display format (673K) found on YouTubes video & channel pages.

This library will convert YouTube's formatted strings to integers for easy database storage, front end display, etc.

YouTube Data API Request

GET /v3/channels?part=statistics&forUsername=howdiniguru&key=...&fields=items(statistics(subscriberCount))

Pre August 2019 response

{
 "items": [
  {
   "statistics": {
    "subscriberCount": "673335"
   }
  }
 ]
}

Post August 2019 response

{
 "items": [
  {
   "statistics": {
    "subscriberCount": "673K"
   }
  }
 ]
}

Installation & Usage

composer require touchstorm/youtube-subscriber-parser
require_once __DIR__ . '/../vendor/autoload.php';

use Subscriber\Count;

$tens_abbr_count = '41';
$hundreds_abbr_count = '311';
$thousands_decimal_abbr_count = '1.5K';
$thousands_abbr_count = '883K';
$millions_abbr_count = '99M';
$hundred_millions_abbr_count = '943M';

echo Count::parse($tens_abbr_count); // 41
echo Count::parse($hundreds_abbr_count); // 311
echo Count::parse($thousands_decimal_abbr_count); // 1500
echo Count::parse($thousands_abbr_count); // 883000
echo Count::parse($millions_abbr_count); // 99000000
echo Count::parse($hundred_millions_abbr_count); // 943000000

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固