UnforgivenCL / LaraChileanCongress by Unforgivencl

Provides an wrapper to opendata.congreso.cl with Laravel 5.3.
9
1
2
Package Data
Maintainer Username: Unforgivencl
Maintainer Contact: guillermo.lobos.parada@gmail.com (guillermo lobos)
Package Create Date: 2016-10-22
Package Last Update: 2016-11-01
Language: PHP
License: MIT
Last Refreshed: 2025-02-12 15:08:43
Package Statistics
Total Downloads: 9
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 1
Total Open Issues: 0

LaraChileanCongress - Wrapper for opendata.congreso.cl web service

Package to facilitate the use of opendata.congreso.cl web service using Laravel

Installation

To add this package on your Laravel project add this on your `composer.json file

"unforgivencl/larachileancongress": "dev-master"

To install and configure add the service provider to your config/app.php

Unforgivencl\LaraChileanCongress\LaraChileanCongressServiceProvider::class,

If you want to use the Facade add this to your facade section on config/app.php

'ChileanCongress' => Unforgivencl\LaraChileanCongress\Facades\LaraChileanCongress::class,

Usage

For example if you want to get all delegates you can use

In some endpoints the web service changes url (delegates), to use that WS you need to change with setDelegates() method, if you use the senators endpoint use setSenators() , by default it's set to Senators

$delegates = ChileanCongress::delegate()->setDelegates()->getDelegates()->fetch();

If you want to get information of a votation of senators you can use

$votation = ChileanCongress::votation()->number('8575')->getSenatorsVotation()->fetch();

If you want to get a specific law project you can use

$lawProject = ChileanCongress::lawproject()->number('1')->getLawProject()->fetch();

Response

All responses are converted to JSON from an XML Response, if you see any weird index or order, i'm sorry but the web service are very incosistent

Development

This package are under development so if you find any bug feel free to send PR or send an issue.