承接 happytodev/blueskyapiwithphp 相关项目开发

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

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

happytodev/blueskyapiwithphp

最新稳定版本:v0.1.0

Composer 安装命令:

composer require happytodev/blueskyapiwithphp

包简介

A PHP Package to interact with Bluesky API

README 文档

README

Latest Version on Packagist Tests Total Downloads

A package to interact with Bluesky API with PHP.

Support me

I invest a lot of time to create many things for the community. You can sponsor me if you want.

Installation

You can install the package via composer:

composer require happytodev/blueskyapiwithphp

Usage

A little example with Laravel but you can use in plain PHP or with your favorite framework too. It's up to you.

<?php

namespace App\Http\Controllers;

use Happytodev\Blueskyapiwithphp\Blueskyapiwithphp;

class BlueskyController extends Controller
{
    protected $blueskyApi;

    public function __construct()
    {
        $this->blueskyApi = new Blueskyapiwithphp(config('services.bluesky.api_key'));
    }

    public function showLikes($handle, $postId)
    {
        $likes = $this->blueskyApi->getPostLikes($handle, $postId);

        return view('likes', compact('likes'));
    }

    public function showPostLikesNumber($handle, $postId)
    {
        $likesCount = $this->blueskyApi->getPostLikesCount($handle, $postId);
        $repostsCount = $this->blueskyApi->getPostRepostsCount($handle, $postId);
        $repliesCount = $this->blueskyApi->getPostRepliesCount($handle, $postId);

        dd($likesCount, $repostsCount, $repliesCount);
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-26