dbleu/php-libary

PHP-Libary 用于 https://discord-botlist.eu/

dev-main 2022-11-07 11:58 UTC

This package is not auto-updated.

Last update: 2024-09-25 05:14:17 UTC


README


欢迎 👋‹
本软件包为您提供了一种更友好、更简单的与 discord-botlist.eu HTTP API 交互的方式。此软件包由 KeksDev 制作。

安装

composer require dbleu/php-libary

入门指南

<?php
use dbleu\Main;

require_once __DIR__ . '/vendor/autoload.php';

// Init Libary
$api = new Main("<API Token>");

// Get an array with all dates when the bot was voted for
$votes = $api->getVotes();
var_dump($votes);

// Get the current information about the bot
$information = $api->getBotData();
var_dump($information);

// Update the server count
$newCount = 1;
$count = $api->updateGuildCount($newCount);
var_dump($count);

getVotes()

数组

getBotData()

对象

updateGuildCount(serverCount)

{
  "updated": Array,
  "bot": Object
}