PHP code example of ivmelo / suapclient

1. Go to this page and download the library: Download ivmelo/suapclient library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ivmelo / suapclient example snippets


$suap = SUAP('token');
// ou
$suap = SUAP();
$suap->setToken('token');


$meusDados = $suap->getMeusDados();

$meusDados = $suap->getMeusPeriodosLetivos();

$turmasVirtuais = $suap->getTurmasVirtuais(2017, 1);

$horarios = $suap->getHorarios(2017, 1);
json
""ivmelo/suap-api-php": "1.0.*"
}
bash
$ composer 

$suap = SUAP();
$data = $suap->autenticar('20121014040000', 'senhaouchave');

Array
(
    [1] => Array
        (
            [M] => Array
                (
                    ...
                )

            [V] => Array
                (
                    ...
                )

            [N] => Array
                (
                    ...
                )

        )

    [2] => Array
        (
            [M] => Array
                (
                    [1] => Array
                        (
                            [time] => 07:00 - 07:45
                        )

                    ...

                    [5] => Array
                        (
                            [time] => 10:30 - 11:15
                            [aula] => Array
                                (
                                    [id] => 23115
                                    [sigla] => TEC.0075
                                    [descricao] => Aplicações com Interfaces Ricas
                                    [observacao] =>
                                    [locais_de_aula] => Array
                                        (
                                            [0] => Laboratório 06 - DIATINF - Informática (CNAT)
                                        )

                                    [horarios_de_aula] => 2M56 / 4M56
                                )

                        )

                    [6] => Array
                        (
                            [time] => 11:15 - 12:00
                            [aula] => Array
                                (
                                    [id] => 23115
                                    [sigla] => TEC.0075
                                    [descricao] => Aplicações com Interfaces Ricas
                                    [observacao] =>
                                    [locais_de_aula] => Array
                                        (
                                            [0] => Laboratório 06 - DIATINF - Informática (CNAT)
                                        )

                                    [horarios_de_aula] => 2M56 / 4M56
                                )

                        )

                )

            [V] => Array
                (
                    [1] => Array
                        (
                            [time] => 13:00 - 13:45
                        )

                    [2] => Array
                        (
                            [time] => 13:45 - 14:30
                        )

                    [3] => Array
                        (
                            [time] => 14:40 - 15:25
                            [aula] => Array
                                (
                                    [id] => 20118
                                    [sigla] => TEC.0011
                                    [descricao] => Gestão de Tecnologia da Informação
                                    [observacao] =>
                                    [locais_de_aula] => Array
                                        (
                                            [0] => Audio de Visual 03 - DIATINF - Prédio Anexo - 1º Andar (CNAT)
                                        )

                                    [horarios_de_aula] => 2V34 / 3V56
                                )

                        )

                    [4] => Array
                        (
                            [time] => 15:25 - 16:10
                            [aula] => Array
                                (
                                    [id] => 20118
                                    [sigla] => TEC.0011
                                    [descricao] => Gestão de Tecnologia da Informação
                                    [observacao] =>
                                    [locais_de_aula] => Array
                                        (
                                            [0] => Audio de Visual 03 - DIATINF - Prédio Anexo - 1º Andar (CNAT)
                                        )

                                    [horarios_de_aula] => 2V34 / 3V56
                                )

                        )

                    [5] => Array
                        (
                            [time] => 16:30 - 17:15
                        )

                    [6] => Array
                        (
                            [time] => 17:15 - 18:00
                        )

                )

            [N] => Array
                (
                    [1] => Array
                        (
                            [time] => 19:00 - 19:45
                        )

                    ...

                    [4] => Array
                        (
                            [time] => 21:25 - 22:10
                        )

                )

        )

    [3] => Array
        (
            ...
        )

    ...

    [7] => Array
        (
            ...
        )

)
bash
$ git clone [email protected]:ivmelo/suap-api-php.git
$ cd suap-api-php
$ composer install
$ cd tests
$ php test.php <matricula> <chave>