forked from ecilion/itsup-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
41 lines (31 loc) · 1.06 KB
/
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
37
38
39
40
41
<?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 Sctr\Bang\Api\Client;
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
$client = new Client(
[
'scheme' => 'http',
'host' => 'dev.api.bang.com',
'api_key' => 'NTA1MjE2MmU2Y2I0MGU0MjZjZTMxM2FhNzI1MGY5NDBmZWYxMDUwZg==',
'cache_dir' => __DIR__.'/cache/',
]
);
var_dump($client->geoip->getCity('76.167.242.198'));
/*
//$customer = $client->customer->getByCustomerId(374001);
$customer = $client->customer->getByEmailOrUsername('[email protected]');
$password = strip_tags(strtolower(trim('rav740x')));
$password = substr(str_replace(' ', '', str_replace('"', '', str_replace("\n", '', $password))), 0, 128);
$password = sha1($password);
dump($customer, $customer->getPassword(), $password);
*/