Skip to content

Commit 6fd4f93

Browse files
feat: add endpoints to allow querying child model objects #587
1 parent d14e54f commit 6fd4f93

29 files changed

Lines changed: 674 additions & 2 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many TrafficShaperLimiterBandwidth Model objects at
11+
* /api/v2/firewall/traffic_shaper/limiter/bandwidths.
12+
*/
13+
class FirewallTrafficShaperLimiterBandwidthsEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/firewall/traffic_shaper/limiter/bandwidths';
17+
$this->model_name = 'TrafficShaperLimiterBandwidth';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many TrafficShaperLimiterQueue Model objects at
11+
* /api/v2/firewall/traffic_shaper/limiter/queues.
12+
*/
13+
class FirewallTrafficShaperLimiterQueuesEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/firewall/traffic_shaper/limiter/queues';
17+
$this->model_name = 'TrafficShaperLimiterQueue';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many TrafficShaperQueue Model objects at
11+
* /api/v2/firewall/traffic_shaper/queues.
12+
*/
13+
class FirewallTrafficShaperQueuesEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/firewall/traffic_shaper/queues';
17+
$this->model_name = 'TrafficShaperQueue';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many RoutingGatewayGroupPriority Model objects at
11+
* /api/v2/routing/gateway/group/priorities.
12+
*/
13+
class RoutingGatewayGroupPrioritiesEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/routing/gateway/group/priorities';
17+
$this->model_name = 'RoutingGatewayGroupPriority';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many BINDAccessListEntry Model objects at
11+
* /api/v2/services/bind/access_list/entries.
12+
*/
13+
class ServicesBINDAccessListEntriesEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/bind/access_list/entries';
17+
$this->model_name = 'BINDAccessListEntry';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with multiple DHCPServerAddressPool Model objects at
11+
* /api/v2/services/dhcp_server/address_pools.
12+
*/
13+
class ServicesDHCPServerAddressPoolsEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/dhcp_server/address_pools';
17+
$this->model_name = 'DHCPServerAddressPool';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with multiple DHCPServerCustomOption Model objects at
11+
* /api/v2/services/dhcp_server/custom_options.
12+
*/
13+
class ServicesDHCPServerCustomOptionsEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/dhcp_server/custom_options';
17+
$this->model_name = 'DHCPServerCustomOption';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many DHCPServerStaticMapping Model objects at
11+
* /api/v2/services/dhcp_server/static_mappings.
12+
*/
13+
class ServicesDHCPServerStaticMappingsEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/dhcp_server/static_mappings';
17+
$this->model_name = 'DHCPServerStaticMapping';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many DNSForwarderHostOverrideAlias Model objects at
11+
* /api/v2/services/dns_forwarder/host_override/aliases.
12+
*/
13+
class ServicesDNSForwarderHostOverrideAliasesEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/dns_forwarder/host_override/aliases';
17+
$this->model_name = 'DNSForwarderHostOverrideAlias';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace RESTAPI\Endpoints;
4+
5+
require_once 'RESTAPI/autoloader.inc';
6+
7+
use RESTAPI\Core\Endpoint;
8+
9+
/**
10+
* Defines an Endpoint for interacting with many DNSResolverAccessListNetwork Model objects at
11+
* /api/v2/services/dns_resolver/access_list/networks.
12+
*/
13+
class ServicesDNSResolverAccessListNetworksEndpoint extends Endpoint {
14+
public function __construct() {
15+
# Set Endpoint attributes
16+
$this->url = '/api/v2/services/dns_resolver/access_list/networks';
17+
$this->model_name = 'DNSResolverAccessListNetwork';
18+
$this->many = true;
19+
$this->request_method_options = ['GET', 'DELETE'];
20+
21+
# Construct the parent Endpoint object
22+
parent::__construct();
23+
}
24+
}

0 commit comments

Comments
 (0)