tobya/bcsapiwrapper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tobya/bcsapiwrapper

最新稳定版本:v4.45

Composer 安装命令:

composer require tobya/bcsapiwrapper

包简介

BCS Api Wrappers

README 文档

README

BCS API Wrapper Library BCSAPI Library V4

Latest Stable Version Total Downloads Latest Unstable Version License

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=

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.

https://github.com/tobya/bcsStudents_gitp4/blob/LaravelSubscriptions/resources/postman/api.cookingisfun.ie%20v2.postman_collection.json

统计信息

  • 总下载量: 4.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固