silicondigital / roblox
Roblox API for Laravel
1.0.2
2020-09-09 20:04 UTC
Requires
- php: >7.3
- illuminate/support: ~5.5 || ~6.0 || ~7.0 || ~8.0
This package is auto-updated.
Last update: 2025-04-24 14:55:20 UTC
README
Unofficial Roblox API Wrapper for Laravel 9
Installation
composer require silicondigital/roblox
Functions
Badges
getBadge(int $badge_id)
- Returns a single badgegetUniverseBadges(int $universe_id, int $limit = 10, string $sort_order = 'Asc')
- Returns badges for a universegetUserBadges(int $user_id, int $limit = 10, string $sort_order = 'Asc')
- Returns badges for a single usergetBadgeAwardedDates(int $user_id, array $badge_ids)
- Returns the awarded dates for an array of badge ids for a user.
Caching Responses
To speed up your application this API provides caching functionality using Laravel's built in cache functions. You'll need to make sure this is configured before using this feature. Laravel Docs: Cache.
All API's will allow you to pass through options for the cache, the key must be unique otherwise it will be overwritten. Typically you should set the key name as what the response will be for example badge_{badge_id}
.
Option | Functionality | Example |
---|---|---|
key_name | A unique key name for the cached response | badge_1234 |
ttl | How long the data will be cached for (in seconds) | 3600 |
tags | An array of tags to append to the cached item | ['badges'] |
Internally the API will prefix the cache key with roblox_
, if you wish to interact with the cached data directly using the Laravel cache facade see the below examples.
use Illuminate\Support\Facades\Cache; Cache::get('roblox_{your key name}'); // e.g roblox_badge_1234 Cache::tags(['badges'])->flush();