tobya / bcsapiwrapper
BCS Api Wrappers
Installs: 2 625
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 1
Open Issues: 5
Requires
- guzzlehttp/guzzle: ^7.8.1
- laravel/framework: ^7.0|^8.0|^9.0|^10|^11.0
- spatie/url: ^2.0
- dev-main
- 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-storesnapshots
- dev-RecipeBrowseList
- dev-WebflowBCSLivev4
- dev-Newphotoapimethod
- dev-BetterErrorCathing
- dev-addImageBank
- dev-addTelegram
- dev-RecipeBookletLists
This package is auto-updated.
Last update: 2024-11-01 20:47:47 UTC
README
BCS API Wrapper Library BCSAPI Library V4
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
BCSBACKOFFICE_APIURL=
BCSBACKOFFICE_APIKEY=
# New BCS V4 Api Urls / V3 discontinued
BCSBACKOFFICE_V4_APIURL=
BCSBACKOFFICE_V4_APITOKEN=
# Photo Api
DEMOPHOTO_APIURL=
#Recipe Api
BCSRECIPE_APIURL=
BCSRECIPE_APIKEY=
Keep up to date
composer update
Upgrading from V2
You need to add the following to config/bcsapi.php
'v4' => [ 'backoffice' => [ 'url' => env('BCSBACKOFFICE_V4_APIURL',''), 'token' => env('BCSBACKOFFICE_V4_APITOKEN',''), ], ]
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.
Tests
There is a Postman Collection to do tests on the main BCSApi routes.