承接 nlocascio/mindbody-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nlocascio/mindbody-laravel

最新稳定版本:v0.3.7

Composer 安装命令:

composer require nlocascio/mindbody-laravel

包简介

Laravel wrapper for MINDBODY API

README 文档

README

Access the MINDBODY API from your Laravel application.

Latest Stable Version Packagist Downloads Software License Build Status

Requirements

This package requires:

  • PHP 7.0+
  • Laravel 5.1+

You will also need the following credentials to access the MINDBODY API:

  • SourceCredentials consisting of your SourceName and Password
  • Site ID (or multiple Site IDs) corresponding to the MINDBODY site(s) you are connecting to

For API credentials and documentation, visit the MINDBODY Developers site.

Installation

Install the package through Composer:

composer require nlocascio/mindbody-laravel

Registering the Service Provider

Append the service provider to the providers key in config/app.php:

Nlocascio\Mindbody\MindbodyServiceProvider::class

Configuring API Credentials

Configure your API credentials by defining the following environment variables in .env:

MINDBODY_SOURCENAME=                // Your Source Name
MINDBODY_SOURCEPASSWORD=            // Your Source Password
MINDBODY_SITEIDS=                   // Site ID. (Also accepts a comma-delimitted list of IDs)

Usage

Option 1: Type-hinting

You may type-hint the Mindbody class in methods of classes which are resolved by the service container:

public function index(Mindbody $mindbody)
{
    $response = $mindbody->GetClients();
}

Option 2: Use Laravel's helper method

use Nlocascio\Mindbody\Mindbody;

public function index()
{
    $mindbody = resolve(Mindbody::class);
    
    $mindbody->GetClients();
}

Running API functions

Examples:

$mindbody = resolve(Mindbody::class);

$result = $mindbody->GetSites();

With arguments:

$mindbody = resolve(Mindbody::class);

$result = $mindbody->GetClients([
    'XMLDetail'         => 'Bare',
    'Fields'            => [
                                'Clients.FirstName',
                                'Clients.LastName'
                            ],
    'PageSize'          => 500,
    'CurrentPageIndex'  => 1,
    'SearchText'        => 'example@email.com'
]);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-25