Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

KriKrixs/PHP-BeatSaver-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SearchMap function# PHP BeatSaver API

Latest Version on Packagist Software License Quality Score Total Downloads

A Simple PHP library to interact with BeatSaver's API

Install

Via Composer

$ composer require krikrixs/php-beatsaver-api

Usage

// [Composer] Create the object
$BeatSaverAPI = new BeatSaverAPI("ApplicationName");

// [Not Composer] Create the object
$BeatSaverAPI = new BeatSaverAPI("ApplicationName", true);

// Functions
$BeatSaverAPI->getMapByID((int) $mapId);
$BeatSaverAPI->getMapByKey((string) $bsrKey);
$BeatSaverAPI->getMapByHash((string) $mapHash);
$BeatSaverAPI->getMapsByIDs((array) $mapsIds);
$BeatSaverAPI->getMapsByKeys((array) $bsrKeys);
$BeatSaverAPI->getMapsByHashes((array) $mapsHashes);
$BeatSaverAPI->getMapsByUploaderID((int) $uploaderID, (int) $limit);
$BeatSaverAPI->getMapsSortedByLatest((bool) $autoMapper);
$BeatSaverAPI->getMapsSortedByPlays((int) $limit);
$BeatSaverAPI->downloadMapByIds((array) $ids, (string) $targetDir);
$BeatSaverAPI->downloadMapByKeys((array) $keys, (string) $targetDir);
$BeatSaverAPI->downloadMapByHashes((array) $hashes, (string) $targetDir);
// $sortOrder possible values: 1 = Latest | 2 = Relevance | 3 = Rating
$BeatSaverAPI->searchMap((int) $limit, (int) $sortOrder = 1, (string) $mapName = null, (DateTime) $startDate = null, (DateTime) $endDate = null, (bool) $ranked = false, (bool) $automapper = false, (bool) $chroma = false, (bool) $noodle = false, (bool) $cinema = false, (bool) $fullSpread = false, (float) $minBpm = null, (float) $maxBpm = null, (float) $minNps = null, (float) $maxNps = null, (float) $minRating = null, (float) $maxRating = null, (int) $minDuration = null, (int) $maxDuration = null): ResponseMaps; 

Change log

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact me on discord OMDN | Krixs#1106 or by email [email protected] instead of using the issue tracker.

Credits

License

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

About

A PHP library to interact with BeatSaver API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages