Skip to content

Latest commit

 

History

History
58 lines (34 loc) · 1.92 KB

readme.md

File metadata and controls

58 lines (34 loc) · 1.92 KB

Intro


Synopsis

This Laravel package completely depends on Purdue API. I developed this package, because I wanted to ease off the process of using Purdue Course API, at the same time, I wanted to provide a tool that helps to focus on what we want to build without spending too much time on writing long queries. I believe that my primary goal of making the Purdue API as easily usable and approachable as possible in PHP is getting successful and hope it will be further developed and upgraded in the future.

Introduction

As this package is based on the Purdue API, requesting to the web to obtain the data is necessary. Thus, it requires to use a GuzzleHttp package.


Installing and Setting Up the Package

This package requires a GuzzleHttp package.

Installing

composer require dongyukang/purduecourse

Setup

Register DongyuKang\PurdueCourse\PurdueCourseServiceProvider in 'providers' array of config/app.php.

Usage

If you want to use Facade, then add

use DongyuKang\PurdueCourse\Facades\Purdue;

on the top section.


Purpose and Example

I developed this package primarily to reduce amount of time and code that I should spend and write to retrieve Purdue course data.

For instance, if you want to request every data of 'CS 180' during Fall semester of 2016. You just write a single line of code,

Purdue::fall(2016)->course('cs 180')->all();

instead of lines of sending requests, writing queries, parsing data and all other time consuming tasks, this package will take care of every long and repeating process.

Below is a screenshot of result data that you will get from the code above.

Result

For more detail, refer to WIKI