Download the PHP package langleyfoxall/press-association-tv-api-wrapper without Composer

On this page you can find all versions of the php package langleyfoxall/press-association-tv-api-wrapper. 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 press-association-tv-api-wrapper

📺⌚️ Press Association TV API Wrapper

Packagist

This package provides a client for the Press Association TV API.

It provides access to information regarding TV channels, schedules and schedule items.

The Press Association (PA) is the national news agency for the UK and Ireland and a leading multimedia content provider across web, mobile, broadcast and print. For the last 145 years PA has been providing fast, accurate feeds of text, data, photos and video. Today the business is increasingly focused on the delivery of complete products for both digital and print clients.

Installation

To install, just run the following Composer command from the root of your project.

Usage

First instantiate the client using your API key.

Channels

To retrieve details regarding a channel, call the getChannel method, passing it a channel ID. If you wish to retrieve details on multiple channels at once, you can call the getChannels method instead, passing it an array of channel IDs.

These methods will, respectively, return a Channel object or a collection of Channel objects.

You may wish to surround this method call with a try catch block to catch any networking exceptions.

Example Channel object

The example below shows the available public properties that are available with a Channel object.

Schedules

You can retrieve the schedule for today by calling the getScheduleForToday method, passing it an array of channel IDs. Similarly, you can also retrieve the schedule for a specific day using the getScheduleForDay method, passing it an array of channel IDs and a Carbon date object.

Both of these method will return a Schedule object.

You may wish to surround this method call with a try catch block to catch any networking exceptions.

You can then retrieve all schedule items, by calling the Schedule object's all method.

Alternatively, you can retrieve schedule items filtered by genre, by calling the Schedule object's getByGenre method. This method accepts a genre or sport name, such as Football, Tennis, or Boxing.

Example ScheduleItem object

The example below shows the available public properties that are available with a ScheduleItem object.

Limitations

This library does not currently deal with API pagination. This should not be a problem, as channels do not tend to have over 1000 schedule items per day.


All versions of press-association-tv-api-wrapper with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.3
illuminate/support Version ^5.1
cache/filesystem-adapter Version ^1.0
nesbot/carbon Version ^1.25
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 langleyfoxall/press-association-tv-api-wrapper contains the following files

Loading the files please wait ....