Download the PHP package dacotahharvey/thebluealliance-phpwrapper without Composer

On this page you can find all versions of the php package dacotahharvey/thebluealliance-phpwrapper. 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 thebluealliance-phpwrapper

thebluealliance-phpwrapper

A PHP wrapper that assists in the use of the API provided by http://www.thebluealliance.com

Installation

Composer

Installing the application through Composer is the fastest way to get all setup. To do this navigate to the root of your project in the terminal and run

composer require dacotahharvey/thebluealliance-phpwrapper

Then when you use the project include the two following lines at the top of your file

Manually Cloning

  1. In your project make a new folder called tbaAPI
  2. Download this repository.
  3. Unzip the files that you downloaded and place them in the tbaAPI folder that you previously created.
  4. Include the following line at the top of the file that you wish to use the wrapper in

Library Usage

To use this library you need to have an API Key from The Blue Alliance. You can find more information on how to do this here https://www.thebluealliance.com/apidocs

  1. Create a new reference to the library like so

  2. Call the functions provided to retrieve your data like so

All of the functions provided by the wrapper take the same three paramters

  1. $request_parameters - Any paramters that that the endpoint needs for the query
  2. $headers - Any additional headers that you want to send with the request
  3. $full_response - Whether you want the full response or just the JSON returned by The Blue Alliance

Lets say for example we wanted to make a request to get the team 1114. We can find the documentation for this function here Using the var tba from above we can do the following

Executing a Premade Script

Executing a php script is very easy once the initial setup has been taken care of. The scripts provided with this project will work best with PHP 7, however they will also perform with a lower version. Running the scripts that are contained within this repository is simple. It can be accomplished using the three following steps

  1. Clone the repository
  2. In each of the sciripts you will find the library initalization. You must change this in each of the scripts that you wish to run as currently they empty. You can find more information on how to do this in the Library Usage section of this Readme.
  3. Use the following commands in the terminal. Note that the composer install is only used once to generate the autoload file that must exist to properly use the plugin

Then choose the file that you want to run. Each script will contain instructions on how to run it. If you try to run a script with improper commands it will tell you how it should be run. An example of a script being executed once you are in the proper directory is

The script will then run in your terminal instance.

PHP Installation in Mac OSX

Mac OSX comes with PHP by default! If you are ambitious you can upgrade to PHP7. The tutorial steps below will help with that.

  1. Homebrew is the best way to upgrade your Mac instance to PHP7. Homebrew is a tool that will allow you to install packages via the terminal. A fantastic tutorial on what Homebrew is and how to use it can be found here: https://www.howtogeek.com/211541/homebrew-for-os-x-easily-installs-desktop-apps-and-terminal-utilities/

  2. This tutorial is a fantastic reference point for upgrading to PHP7. You can also perform the steps in reverse to downgrade back to PHP5! https://developerjack.com/blog/2015/12/11/Installing-PHP7-with-homebrew/

PHP Installation on Windows

Installing PHP through the command line is an arduous task on windows. The PHP library offers a tutorial on this that can be found here http://php.net/manual/pl/install.windows.commandline.php

Alternatively you can use Xxamp. The homepage for Xxamp with a download link can be found here https://www.apachefriends.org/index.html and a fantastic tutorial on how to use xxamp can be found here https://blog.udemy.com/xampp-tutorial/

Contact Me

If you have any questions or concerns feel free to contact me at [email protected] I am always more than willing to help write a script or setup an environment that will allow you to execute your own scripts!


All versions of thebluealliance-phpwrapper 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 dacotahharvey/thebluealliance-phpwrapper contains the following files

Loading the files please wait ....