Download the PHP package hkwu/uwapi-php without Composer

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

uwapi-php

Latest Stable Version Build Status License

A PHP wrapper for the University of Waterloo's Open Data API supporting asynchronous requests through Guzzle.

This library requires PHP 7.0 or greater.

Installation

Install the client via Composer.

For global installations,

For local installations,

Usage

All request methods are wrapped inside the library's Client class.

The configuration options the Client constructor takes are listed below.

Option Default Description
key - Your API access key.
format 'json' The format you wish the API response to be in. The Client provides these values as constants (e.g. Client::JSON).
async true True if requests should be made asynchronously.

Making Requests

The Client class comes with the request() method for sending requests to the API.

You can send several requests all at once by using the batch() method.

Accessing Response Data

Returned responses from the API are wrapped in data model classes. All data models provide the getRawData() method, which returns the API response as a string.

The JSON (and by extension, GeoJSON) data models provide some additional convenience methods.

Endpoints

The library provides a number of constants to use when making requests. Most of these constants follow directly from the endpoints as provided in the API documentation, but a few have been tweaked to be more usable.

Constant Value
FS_MENU 'foodservices/menu'
FS_NOTES 'foodservices/notes'
FS_DIETS 'foodservices/diets'
FS_OUTLETS 'foodservices/outlets'
FS_LOCATIONS 'foodservices/locations'
FS_WATCARD 'foodservices/watcard'
FS_ANNOUNCEMENTS 'foodservices/announcements'
FS_PRODUCTS_ID 'foodservices/products/{product_id}'
FS_YEAR_WEEK_MENU 'foodservices/{year}/{week}/menu'
FS_YEAR_WEEK_NOTES 'foodservices/{year}/{week}/notes'
FS_YEAR_WEEK_ANNOUNCEMENTS 'foodservices/{year}/{week}/announcements'
FEDS_EVENTS 'feds/events'
FEDS_EVENTS_ID 'feds/events/{id}'
FEDS_LOCATIONS 'feds/locations'
COURSES 'courses'
COURSES_SUBJECT 'courses/{subject}'
COURSES_ID 'courses/{course_id}'
COURSES_CLASS_SCHEDULE 'courses/{class_number}/schedule'
COURSES_SUBJECT_CATALOG 'courses/{subject}/{catalog_number}'
COURSES_SUBJECT_CATALOG_SCHEDULE 'courses/{subject}/{catalog_number}/schedule'
COURSES_SUBJECT_CATALOG_PREREQUISITES 'courses/{subject}/{catalog_number}/prerequisites'
COURSES_SUBJECT_CATALOG_EXAMSCHEDULE 'courses/{subject}/{catalog_number}/examschedule'
AWARDS_GRAD 'awards/graduate'
AWARDS_UNDERGRAD 'awards/undergraduate'
EVENTS 'events'
EVENTS_SITE 'events/{site}'
EVENTS_SITE_ID 'events/{site}/{id}'
EVENTS_HOLIDAYS 'events/holidays'
BLOGS_SITE 'blogs/{site}'
BLOGS_SITE_ID 'blogs/{site}/{id}'
NEWS 'news'
NEWS_SITE 'news/{site}'
NEWS_SITE_ID 'news/{site}/{id}'
OPPORTUNITIES 'opportunities'
OPPORTUNITIES_SITE 'opportunities/{site}'
OPPORTUNITIES_SITE_ID 'opportunities/{site}/{id}'
SERVICES_SITE 'services/{site}'
WEATHER_CURRENT 'weather/current'
TERMS_LIST 'terms/list'
TERMS_TERM_COURSES 'terms/{term}/courses'
TERMS_TERM_EXAMS 'terms/{term}/examschedule'
TERMS_TERM_SUBJECT_SCHEDULE 'terms/{term}/{subject}/schedule'
TERMS_TERM_SUBJECT_CATALOG_SCHEDULE 'terms/{term}/{subject}/{catalog_number}/schedule'
TERMS_TERM_ENROLLMENT 'terms/{term}/enrollment'
TERMS_TERM_SUBJECT_ENROLLMENT 'terms/{term}/{subject}/enrollment'
TERMS_TERM_INFOSESSIONS 'terms/{term}/infosessions'
RESOURCES_TUTORS 'resources/tutors'
RESOURCES_INFOSESSIONS 'resources/infosessions'
RESOURCES_GOOSEWATCH 'resources/goosewatch'
RESOURCES_SUNSHINELIST 'resources/sunshinelist'
CODES_UNITS 'codes/units'
CODES_TERMS 'codes/terms'
CODES_GROUPS 'codes/groups'
CODES_SUBJECTS 'codes/subjects'
CODES_INSTRUCTIONS 'codes/instructions'
BUILDINGS_LIST 'buildings/list'
BUILDINGS_CODE 'buildings/{building_code}'
BUILDINGS_BUILDING_ROOM_COURSES 'buildings/{building}/{room}/courses'
BUILDINGS_CODE_ACCESSPOINTS 'buildings/{building_code}/accesspoints'
BUILDINGS_CODE_VENDINGMACHINES 'buildings/{building_code}/vendingmachines'
POI_ATMS 'poi/atms'
POI_GREYHOUND 'poi/greyhound'
POI_HELPLINES 'poi/helplines'
POI_LIBRARIES 'poi/libraries'
POI_PHOTOSPHERES 'poi/photospheres'
POI_DEFIBRILLATORS 'poi/defibrillators'
POI_CONSTRUCTIONSITES 'poi/constructionsites'
POI_ACCESSIBLEENTRANCES 'poi/accessibleentrances'
POI_VISITORINFORMATION 'poi/visitorinformation'
PARKING_WATPARK 'parking/watpark'
PARKING_LOTS_METER 'parking/lots/meter'
PARKING_LOTS_PERMIT 'parking/lots/permit'
PARKING_LOTS_VISITOR 'parking/lots/visitor'
PARKING_LOTS_SHORTTERM 'parking/lots/shortterm'
PARKING_LOTS_ACCESSIBLE 'parking/lots/accessible'
PARKING_LOTS_MOTORCYCLE 'parking/lots/motorcycle'
TRANSIT_GRT 'transit/grt'
TRANSIT_GRT_STOPS 'transit/grt/stops'
DIRECTORY_ID 'directory/{user_id}'
API_USAGE 'api/usage'
API_SERVICES 'api/services'
API_METHODS 'api/methods'
API_VERSIONS 'api/versions'
API_CHANGELOG 'api/changelog'
SERVER_TIME 'server/time'
SERVER_CODES 'server/codes'

Contributing

Feel free to make pull requests for any changes.

Just a couple of things:


All versions of uwapi-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
guzzlehttp/guzzle Version ^6.2
nicmart/string-template Version ^0.1.0
symfony/options-resolver Version ^3.1
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 hkwu/uwapi-php contains the following files

Loading the files please wait ....