yurich84/jobready-api 问题修复 & 功能扩展

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

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

yurich84/jobready-api

Composer 安装命令:

composer require yurich84/jobready-api

包简介

Jobready Plus API wrapper for Laravel

README 文档

README

Laravel 6 License

Use a Official Jobready Plus API Documentation

Install

composer require Yurich84/jobready-api

Usage

Add the following lines to .env

JOBREADY_USER=your_user_name
JOBREADY_KEY=your_secret_key
JOBREADY_URL=your_domain.jobreadyplus.com/webservice/

Available methods

where - adds entity's parameters to request

find - gets single entity

findBulk - retrieve entities by array of uris

get - gets list of entities

uri - gets generated uri

url - gets generated url

create

update

getResponse - manually sending get request

postResponse - manually sending post request

Examples

Find

use Yurich84\JobReadyApi\Entities\Courses;
...
    $course_number = '99AUS999';
    $courses = (new Courses)->find($course_number);

Get list of Events with limit 20

use Yurich84\JobReadyApi\Entities\Events;
use Yurich84\JobReadyApi\JobReady;
use \Carbon\Carbon;
...
$events = (new Events)
    ->where(Events::PARAMETER_DATE_FROM, Carbon::now()->format(JobReady::DATE_FORMAT))
    ->where(Events::PARAMETER_DATE_TO, Carbon::now()->addWeek()->format(JobReady::DATE_FORMAT))
    ->get(20);

Create

use Yurich84\JobReadyApi\Entities\Trainers;
...
$data = (new Trainers)->create([
    Trainers::FIELD_PARTY_ID => 'PAUS000000'
]);

Update

use Yurich84\JobReadyApi\Entities\Trainers;
...
$payload = [
    Trainers::FIELD_ENABLED => true,
    Trainers::FIELD_EMPLOYMENT_BASIS => 'full-time',
    Trainers::FIELD_IND_ASSESSOR => true,
    Trainers::FIELD_IND_COORDINATOR => true,
    Trainers::FIELD_IND_TRAINER => true,
];
$data = (new Trainers)->update('9804', $payload);    

Manually creating

use Yurich84\JobReadyApi\Entities\Events;
use Yurich84\JobReadyApi\JobReady;
use \Carbon\Carbon;
...

$course_number = '99AUS999';

$date = Carbon::now()->addWeeks(2)->format(JobReady::DATE_FORMAT);

$payload = [
    'event' => [
        Events::FIELD_TITLE => 'Test Event',
        Events::FIELD_EVENT_DATE => $date,
        Events::FIELD_START_TIME => '09:00:00',
        Events::FIELD_END_TIME => '15:00:00',
        Events::FIELD_ALL_STAFF => true,
        Events::FIELD_ALL_STUDENTS => true,
    ]
];

$data = (new Events)->postResponse("courses/{$course_number}/events", $payload);

License MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固