Download the PHP package mgargano/baseball-tools without Composer

On this page you can find all versions of the php package mgargano/baseball-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package baseball-tools

Baseball Tools Player Library

v. 0.1 beta

by Matthew Gargano [email protected]


PHP Library of functions that provide access to the Baseball-Databank (www.baseball-databank.org) and succeeding databases (as of this release managed by Sean Lahman at www.seanlahman.com/baseball-archive/statistics/). This library requires the open source database class ezSQL by Justin Vincent for more information: http://justinvincent.com/ezsql

Note

I've got a long way to go, but this update should really help get the ball rolling. When I first wrote this project I was far from a seasoned developer and my time is limited now, but I had some time one afternoon to fix this project up to improve it a little bit. Stay tuned for more updates; I plan to rewrite this at some point in the future. Don't get mad at me if you dive into the code, it's a little scary :).

Installation

This package uses composer and once composer is installed globally is as easy as setting up a composer.json file containing require directives for ezSQL and this project, i.e.:

{
    "require": {
        "jv2222/ezsql": "dev-master",
        "mgargano/baseball-tools":"dev-master"
    }
}

Usage

The constructor method takes an object of database information, here is an example on how to instantiate an object and get information about 2 players ( from my beloved New York Mutts 8-) ) Note that the namespace for the class used is Baseball_tools

require_once('vendor/autoload.php');
$db = new stdClass;
$db->user = 'baseball';
$db->password = 'baseball';
$db->db = 'baseball';
$db->server = 'localhost';
$bb = new Baseball_tools\Baseball_tools( $db );
$bb->set_player( 'wrighda03' );
$david_wright_age = $bb->get_age();
$bb->set_player( 'murphda08' );
$daniel_murphy_age = $bb->get_age();
echo 'david wright is ' . $david_wright_age . ' years old<br />daniel murphy is ' . $daniel_murphy_age . ' years old';

Current function/method list:

* get_age ()
* get_bats ()
* get_bbref_id ()
* get_birthday ()
* get_birthplace ()
* get_college ()
* get_deathday ()
* get_deathplace ()
* get_given_name ()
* get_height_feet ()
* get_height_inches ()
* get_hof_id ()
* get_holtz_id ()
* get_lahman_id ()
* get_lahman_4_0_id ()   
* get_lahman_4_5_id ()
* get_manager_id ()
* get_name ()
* get_name_note ()
* get_nick_name ()     
* get_player_type ()
* get_retro_id ()
* get_stats ($year [optional])
* get_throws ()
* get_weight ()        

Release Notes

Version 0.1 beta

Version 0.003 pre-beta

Version 0.002 pre-beta

Version 0.001 Alpha

<<!!IMPORTANT!!>>

This software is meant for personal research purposes. Please consult the terms of use, terms of service for each source of data, IDs, information and data. License: Copyright 2014 Matthew Gargano (email : [email protected]) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.


All versions of baseball-tools with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mgargano/baseball-tools contains the following files

Loading the files please wait ....