PHP Classes

PHP API de Notificação de Concurso Público: Get information about public tenders in São Paulo

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 27 All time: 11,180 This week: 206Up
Version License PHP version Categories
api-notificacao-conc 1.0GNU General Publi...5PHP 5, Web services
Description 

Author

This package is specific mainly for applications used in Brazil Brazil .

This package can get information about public tenders in São Paulo, Brazil.

It provides REST API to return information about current public tenders going on by retrieving information from the government site concursopublico.sp.gov.br.

Currently it provides information about the next public tenders, which are still opened, the ones that are going on, and the ones that are closed.

Innovation Award
PHP Programming Innovation award nominee
February 2017
Number 17
Public tenders are organized frequently around the world to give opportunity to different people to apply to jobs in public companies.

This package can get information about public tenders in São Paulo, Brazil, so people interested in the available jobs can process the information according to their interests.

Manuel Lemos
Picture of Lucas de Oliveira
  Performance   Level  
Name: Lucas de Oliveira <contact>
Classes: 5 packages by
Country: Brazil Brazil
Age: 30
All time rank: 2758193 in Brazil Brazil
Week rank: 216 Up20 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 5x

Example

<?php

require_once __DIR__ . '/../bootstrap.php';

use
DOLucas\Concurso\Service\Teste;
use
DOLucas\Concurso\Service\ConcursoService;
use
DOLucas\Concurso\Service\ReceiverService;
use
DOLucas\Concurso\Mapper\ReceiverMapper;
use
Symfony\Component\HttpFoundation\JsonResponse;

$app['debug'] = false;

$app['service.concurso'] = function() use ($app) {
    return new
ConcursoService($app['urls']());
};

$app['service.receiver'] = function() use ($app) {
   
$receiverMapper = new ReceiverMapper(__DIR__ . '/../storage/data.json');
    return new
ReceiverService($app['service.concurso'], $receiverMapper);
};

/**
 * Notificação de concursos abertos por e-mail
 */
$app->get('/notify', function () use ($app) {
   
$emails = $app['service.receiver']->notify();

    return new
JsonResponse([
       
'success' => true,
       
'message' => 'Alertas enviados com sucesso',
       
'sent_at' => new DateTime(),
       
'emails' => $emails
   
]);
});

/**
 * API JSON de concursos
 */
$app->get('/api/concursos/{status}', function ($status) use ($app) {
   
$concursos = $app['service.concurso']->getConcursos($status);

    return new
JsonResponse($concursos);
});

$app->run();


Details

API JSON e notificação por e-mail de concursos públicos

Aplicação para enviar email quando encontrar inscrições de concursos públicos abertas, com API JSON.

Instalação

git clone https://github.com/deoliveiralucas/notificacao-concurso-publico.git

cd notificacao-concurso-publico

composer install

php -S localhost:8888 -t public

Configuração

  • Renomeie o arquivo `storage/data.json.example` para `storage/data.json` e adicione seus dados.
  • Url para enviar notificações `[GET] /notify`

API concursos

  • Próximos concursos

    `[GET] /api/concursos/proximo`

  • Concursos abertos

    `[GET] /api/concursos/aberto`

  • Concursos em andamento

    `[GET] /api/concursos/andamento`

  • Concursos encerrado

    `[GET] /api/concursos/encerrado`

Contribua


  Files folder image Files (13)  
File Role Description
Files folder imagepublic (2 files)
Files folder imagesrc (1 directory)
Files folder imagestorage (1 file)
Accessible without login Plain text file bootstrap.php Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (13)  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files (13)  /  src  
File Role Description
Files folder imageDOLucas (1 directory)

  Files folder image Files (13)  /  src  /  DOLucas  
File Role Description
Files folder imageConcurso (4 directories)

  Files folder image Files (13)  /  src  /  DOLucas  /  Concurso  
File Role Description
Files folder imageMapper (1 file)
Files folder imageProvider (1 file)
Files folder imageResource (1 file)
Files folder imageService (2 files)

  Files folder image Files (13)  /  src  /  DOLucas  /  Concurso  /  Mapper  
File Role Description
  Plain text file ReceiverMapper.php Class Class source

  Files folder image Files (13)  /  src  /  DOLucas  /  Concurso  /  Provider  
File Role Description
  Plain text file ResourceProvider.php Class Class source

  Files folder image Files (13)  /  src  /  DOLucas  /  Concurso  /  Resource  
File Role Description
  Accessible without login Plain text file urls.json Data Auxiliary data

  Files folder image Files (13)  /  src  /  DOLucas  /  Concurso  /  Service  
File Role Description
  Plain text file ConcursoService.php Class Class source
  Plain text file ReceiverService.php Class Class source

  Files folder image Files (13)  /  storage  
File Role Description
  Accessible without login Plain text file data.json.example Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:27
This week:0
All time:11,180
This week:206Up