new update
parent
21acf21971
commit
9e7a4bd4da
|
@ -5,7 +5,7 @@ __Installation__<br>
|
|||
Clone the git repository:
|
||||
```
|
||||
git clone https://github.com/hasanenalbana/sasconnector-php
|
||||
```
|
||||
```
|
||||
Install required libraries:
|
||||
```cd sasconnector-php
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'vendor/autoload.php';
|
|||
|
||||
class SASConnector{
|
||||
|
||||
|
||||
private $client;
|
||||
private $host;
|
||||
private $username;
|
||||
|
|
|
@ -6,6 +6,7 @@ $api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
|||
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('user/activate', [
|
||||
"method" => "credit",
|
||||
"pin" => "",
|
||||
|
|
1
aes.php
1
aes.php
|
@ -6,6 +6,7 @@
|
|||
* Time: 5:09 PM
|
||||
*/
|
||||
|
||||
|
||||
/* Author: Cody Phillips
|
||||
* Company: Phillips Data
|
||||
* Website: www.phpaes.com, www.phillipsdata.com
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
"guzzlehttp/guzzle": "~6.0"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('manager', [
|
||||
"username" => "test_manager2",
|
||||
"enabled" => 1,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('profile', [
|
||||
"name" => "test profile",
|
||||
"enabled" => 1,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('user', [
|
||||
"username" => "testusertest23",
|
||||
"enabled" => 1,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->delete('manager/id', [
|
||||
"page" => 1,
|
||||
"count" => 10,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->delete('profile/id', []);
|
||||
|
||||
print_r(json_decode($res));
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->delete('user/id', []);
|
||||
|
||||
print_r(json_decode($res));
|
||||
|
|
1
test.php
1
test.php
|
@ -6,3 +6,4 @@ $api = new SASConnector('demo4.sasradius.com', 'admin', 'snonosystems');
|
|||
$api->login();
|
||||
$res = $api->post('index/user', []);
|
||||
print_r(json_decode($res));
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('manager/128', [
|
||||
"enabled" => 1,
|
||||
"password" => null,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('profile/31', [
|
||||
"name" => "testprofiletest",
|
||||
"enabled" => 1,
|
||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
|||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||
$api->login();
|
||||
|
||||
|
||||
$res = $api->post('user/id', [
|
||||
"enabled" => 1,
|
||||
"password" => null,
|
||||
|
|
Loading…
Reference in New Issue