-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.php
36 lines (27 loc) · 850 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* Copyright 2016 SCTR Services
*
* Distribution and reproduction are prohibited.
*
* @package itsup-api-client
* @copyright SCTR Services LLC 2016
* @license No License (Proprietary)
*/
$loader = require_once __DIR__.'/../../autoload.php';
use Doctrine\Common\Annotations\AnnotationRegistry;
use Itsup\Api\Client;
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
$client = new Client(
[
'scheme' => 'http',
'host' => 'dev.api.itsup.com',
'api_key' => 'YzEzYmMyOTlmMjU5ZDM4MGFmN2I5OWE3MTdmZDNhNTQzMGEzZjEyMw==',
'cache_dir' => __DIR__.'/cache/',
]
);
$user = new \Itsup\Api\Model\User();
$user->setUsername('apiAdmin');
var_dump($client->user->find($user));
var_dump($client->user->getByUsername('apiAdmin'));
var_dump($client->user->login('apiAdmin'));