Download the PHP package seanmcn/php-represent without Composer

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

PHP Represent

Latest Stable Version Total Downloads Latest Unstable Version License

A PHP library for http://represent.opennorth.ca/

Find the elected officials and electoral districts for any Canadian address or postal code, at all levels of government

Install

Install using composer:

Alternatively you could just download the package and load it in yourself.

Example Usage

API Documentation

Library Documentation

get($path, $params, $throttle);

Returns a single result or one page of results from API path and parameters provided.

Parameters:

Example Usage:

getAll($path, $params);

Returns all results from API path and parameters provided.

Parameters:

Example Usage:

postcode($postcode);

Find representatives and boundaries by postal code.

Parameters:

Example Usage:

boundarySets($name, $params);

Return boundary sets which are groups of electoral districts, like BC provincial districts or Toronto wards.

Parameters:

Example Usage:

boundaries($boundarySet, $name, $representatives, $params)

Return boundaries of electoral districts, can be proved a set like toronto-wards for boundaries of a singular set.

All Parameters are optional however $name requires you provide $boundarySet and $representatives requires you provided both $boundarySet and $name

Parameters:

Example Usage:

representativeSets($set);

Returns all or a singular representative set.

A representative set is a group of elected officials, like the House of Commons or Toronto City Council.

Parameters:

Example Usage:

representatives($set, $params);

Returns a list of representatives.

Parameters:

Example Usage:

elections($election);

Returns a list of elections or a singular election.

This doesn't have any data right now so I am usnure if this is working correctly.

Parameters:

Example Usage:

candidates($election, $params);

Returns a list of all candidates for all elections or all candidates for a singular election

This doesn't have any data right now so I am unsure if this is working correctly.

Parameters:

Example Usage:

setInsecure();

Option to disable using HTTPS, if for example you are having certificate problems while testing this out.

Note: You really shouldn't use this in Production

Example Usage:

setRateLimit($limit);

Option to set the rate limit (per minute) to whatever you choose. The default rate limit is 60 requests per minute.

Note: Don't change this unless you have agreed upon a higher rate limit with Open North otherwise you're going to get HTTP 503 errors

Example Usage:


All versions of php-represent with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.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 seanmcn/php-represent contains the following files

Loading the files please wait ....