gridplay/gridplayapi

GridPlay API

V3 2024-04-21 19:26 UTC

This package is auto-updated.

Last update: 2024-09-14 20:20:19 UTC


README

一个API,用于SecondLife居民使用GridPlay.net服务。

首先使用composer安装

composer require gridplay/gridplayapi

配置只需这样做

php artisan vendor:publish --provider="GridPlayAPI\GPAPIServiceProvider"

这将创建一个位于 config/gridplay.php 的配置文件

此配置文件必须包含您的GPaONE ID和密钥API密钥,以便请求能够通过。

适用于Laravel 11+。

使用很简单

目前处于Alpha 1版本,这里只有第一个部分正在工作。所有GridPlay::相关的功能

GridPlay::Name2Key($user_uuid); // string
GridPlay::Key2Name($user_name); // string
GridPlay::Wmps(); // array
GridPlay::getImg($texture_uuid); // array
GridPlay::getProfPic($user_uuid); //[post] array
GridPlay::sendIM($towho, $msg); //[post] array
GridPlay::isOnline($uuid); //[post] array as ['isOnline' => true|false]

Ventalkie::sendmsg($chan, $nick, $msg); //[post] array
Ventalkie::getChannel($search); // array

// GridHaul will soon be deprecated for a new system so ya know eh
GridHaul::getHub($search); // array
GridHaul::getItems($search); // array
GridHaul::getJobs(); // array

GridPhone::getNumber($search); // array
// these functions will be rewriten in a later version
// Leaving the code in place so that its only server side to write
GridPhone::SendMsg($towho, $from, $msg); //[post] array
GridPhone::Call($towho, $from, $fromname); //[post] array
GridPhone::EndCall($towho, $from); //[post] array
GridPhone::Answer($towho, $from); //[post] array

所有功能都需要在config/gridplay.php中进行配置设置

请参阅我们的wiki,了解返回的json格式内容。请在使用这些函数进行任何进一步编码之前,使用Log::debug查看返回的内容。

对于错误...

连接无效 = 由于某些奇怪的原因,与gridplay服务器的连接无效。无法连接 = 无法连接到gridplay服务器,请稍后再试。无效的密钥 = gridplay.php配置中的ID和SECRET无效。

变更日志

== 3.0.0 - 2024年4月22日 ==

  • 切换到支持Laravel 11以上版本