Skip to content

Commit 584794c

Browse files
committed
Merge branch 'dev'
2 parents baea666 + 828d4ee commit 584794c

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

src/Api/Status.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
namespace TotalVoice\Api;
3+
4+
use TotalVoice\Route;
5+
6+
class Status extends Api
7+
{
8+
/**
9+
* @var string
10+
*/
11+
const ROTA_STATUS = '/status/';
12+
13+
/**
14+
* Verifica o status da API
15+
* @return string
16+
*/
17+
public function verificar()
18+
{
19+
return $this->client->get(new Route([$this->getRota()]));
20+
}
21+
22+
/**
23+
* Consulta o status de um serviço
24+
* @param $nome
25+
* @return string
26+
*/
27+
public function consultar($nome)
28+
{
29+
return $this->client->get(new Route([$this->getRota(), $nome]));
30+
}
31+
32+
/**
33+
* @return string
34+
*/
35+
public function getRota()
36+
{
37+
return self::ROTA_STATUS;
38+
}
39+
}

0 commit comments

Comments
 (0)