Coder Social home page Coder Social logo

php-mindbody-api-library's Introduction

PHP Mindbody API Library

This library provides a set of PHP classes which allow one to interface with the Mindbody SOAP API in a fairly simple way.

The API's main documentation is available through the API portal.

Preparation

Before you can make use of this library, you will need to get a set of API credentials from Mindbody.

As well, you will need to know your Site ID.
Your API credentials must be authorized for your Site ID using the SiteService::GetActivationCode method.

The API sandbox information can be found via the API FAQ.

This library will of course require the SOAP extension be installed and enabled in your PHP installation, and allow_url_fopen must be enabled.

Additionally, if you are running the librarygenerator.php script, you must have the DOM extension enabled, and you must install WSDL2PHP on your system.

Installation

The most simple method of installation is via Composer. Simply add the thefrozenfire/mindbodyapi package as a requirement and update your project.

Alternatively, you can simply clone this project from GitHub.

This library supports PSR-0 autoloading, though you need to register the MindbodyAPI namespace as being in the root of the library, as opposed to vendor-prefixed.

Basic Usage

Here is a very basic usage example for the Site Service class, which should print out a full informational listing on locations associated with your specified site.

<?php
require 'vendor/autoload.php';

$service = MindbodyAPI\MindbodyClient::service("SiteService");

$credentials = $service::credentials(
	"YourSourceName",
	"YourPassword",
	array(
		1234 // Your Site ID(s)
	)
);

$request = $service::request('GetLocations', $credentials);
$locations = $service->GetLocations($request);

var_dump($locations);

php-mindbody-api-library's People

Contributors

darrylkuhn avatar jacobdorman avatar thefrozenfire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-mindbody-api-library's Issues

Class 'MindbodyAPI/services/SiteService' not found

Running your basic example from the README and I get the following error.

Fatal error: Class 'MindbodyAPI/services/SiteService' not found in /full/path/MindbodyAPI/MindbodyClient.php on line 9

I was wanting to play with your code; maybe you have some thoughts to get me past this issue?

UnexpectedValueException

In MindbodyClient.php on line 61 an exception is thrown that doesn't exist.

throw new UnexpectedValueException("{$type} is not a valid type associated with ".get_called_class());

Add a Wiki

A better set of Examples... would make this much more useful.

I have a few I would love to submit.

GetStaffAppointments always returns FirstVisit=true when ClientID is passed.

I've been looking into this error for a while now and can't seem to figure it out. When I call GetStaffAppointments and search by a ClientID and a StartDate and EndDate the api returns all true if the client's actual first visit is included in the response. If the first visit is not in the response FirstVisit returns false as expected for the appointments returned.

I have contacted MindBody thinking it was an api issue and they said that they can't replicate the bug on their end. They asked me if I could provide the xml request to them and I don't know how to get that becuase I'm using your wrapper library. Is there a way to dump the actual xml request to send to them that you know of?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.