tobya / bcsapiwrapper
BCS Api Wrappers
Requires
- ext-json: *
- guzzlehttp/guzzle: ^7.8.1|^8.0
- laravel/framework: ^9.0|^10|^11.0|^12.0|^13.0
- saloonphp/cache-plugin: ^3.0
- saloonphp/laravel-plugin: ^4.00
- spatie/url: ^2.0
- tobya/saloonfire: ^0.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v5.2
- v5.1
- v5.0
- v4.46
- v4.45
- v4.44
- v4.43
- v4.42
- v4.41
- v4.40
- v4.39
- v4.38
- v4.37
- v4.36
- v4.35
- v4.34
- v4.33
- v4.32
- v4.31
- v4.30
- v4.29
- v4.28
- v4.27
- v4.26
- v4.25
- v4.24
- v4.23
- v4.22
- v4.21
- v4.20
- v4.19
- v4.18
- v4.17
- v4.16
- v4.15
- v4.14
- v4.13
- v4.12
- v4.11.0
- v4.10.0
- v4.9.1
- v4.9
- V4.8.4
- V4.8.3
- v4.8
- V4.7.2
- v4.7.1
- v4.7.0
- v4.6.2
- v4.6
- v4.5
- v4.4
- v4.3.1
- v4.3.0
- V4.2.2
- V4.2.1
- v4.2.0
- v4.1.0
- 4.0.0
- dev-courseapiv5
- dev-saloonApiBranch
- dev-v5loader
- dev-recipeapicreateapi
- dev-smotherroleex
- dev-recingreedients
- dev-support-laravel-v12
- dev-Newphotoapimethod
- dev-addImageBank
- dev-addTelegram
This package is auto-updated.
Last update: 2026-10-12 17:49:35 UTC
README
BCS API Wrapper Library BCSAPI Library V4
The BCS Api Wrapper Library provide PHP wrapper classes for most of the APIs used internally within the BCS system.
Overview
From Backoffice
- Course
- Student
- CourseType
- Holiday
- MediaItem
- Note
- Personlist
- Subscriber
- Subscription
- TransactionType
- User
- Voucher
From RecipeApi
- Recipe
- Render
Secure Booking Server
- Secure Bookings
KitchenBook
- Telegram Chat
Photo Api
- PhotoAPI is seperate and currently doesnt have a wrapper.
install
composer require tobya/bcsapiwrapper
Publish config file
php artisan vendor:publish
select BCSApiWrapper
.env updates The following values need to be available in .env file
# Main BCS Api URLS # Required for V1 where KEY is in URL BCSBACKOFFICE_APIURL= BCSBACKOFFICE_APIKEY= # New BCS V4 Api Urls BCSBACKOFFICE_V4_APIURL= BCSBACKOFFICE_V4_APITOKEN= # Photo Api DEMOPHOTO_APIURL= #Recipe Api BCSRECIPE_APIURL= BCSRECIPE_APIKEY=
Generating Backoffice Api Keys
For version 4 generate keys in backoffice. This can be done when logged in as super user , log in as toby.
https://backoffice.cookingisfun.ie/user/settings
Create a token via the form. Both fields are for info only.
Keep up to date
composer update
and .env is
BCSBACKOFFICE_V4_APIURL={base host url, not api.backoffice.ie}
BCSBACKOFFICE_V4_APITOKEN={sanctum token}
V2 BCSApiWrapper
$CourseApi = App('BCSApi')->Course(); $CourseInfo = $CourseApi->CourseInfo(12345); echo $CourseInfo->CourseName;
V4 BCSApiWrapper
$CourseApi = BCSLoader::Course(); $CourseInfo = $CourseApi->CourseInfo(12345); echo $CourseInfo->CourseName;
This may require rewriting of quite a bit of code on upgrading.
V5 BCSApiWrapper
V5 is currently being written and the wrapping function are now being generated with Saloon php
As of writing only Course is available. Use as follows
$CourseApi = BCSApi::V5->CourseApi();
$response = $CourseApi->CourseDetails($courseid);
// retrieve response json data as an object.
$info = $response->Object();
echo $info->course->CourseName;
Tests
There is a Postman Collection to do tests on the main BCSApi routes.