File tree Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 11<?php
2- // client_example .php
2+ require_once ' vendor/autoload .php' ;
33
4- require ' Bind9ApiClient.php ' ;
4+ use Namingo \ Bind9Api \ ApiClient ;
55
66try {
77 // Initialize the client with the API server's base URL
8- $ apiClient = new Bind9ApiClient ('http://localhost:7650 ' );
8+ $ apiClient = new ApiClient ('http://localhost:7650 ' );
99
1010 // Authenticate and obtain a token
1111 $ apiClient ->login ('admin ' , 'password123 ' );
Original file line number Diff line number Diff line change 11{
2+ "name" : " namingo/bind9-api-client" ,
3+ "description" : " The bind9-api-client is a PHP client library designed to interact with the bind9-api-server." ,
4+ "type" : " library" ,
5+ "license" : " MIT" ,
6+ "authors" : [
7+ {
8+ "name" : " Namingo Team" ,
9+ 10+ }
11+ ],
12+ "autoload" : {
13+ "psr-4" : {
14+ "Namingo\\ Bind9Api\\ " : " src/"
15+ }
16+ },
217 "require" : {
3- "guzzlehttp/guzzle" : " ^7.9"
18+ "php" : " >=8.2" ,
19+ "ext-swoole" : " *" ,
20+ "guzzlehttp/guzzle" : " ^7.9"
421 }
5- }
22+ }
Original file line number Diff line number Diff line change 11<?php
2- // Bind9ApiClient.php
32
4- require ' vendor/autoload.php ' ;
3+ namespace Namingo \ Bind9Api ;
54
65use GuzzleHttp \Client ;
76use GuzzleHttp \Exception \RequestException ;
87
9- class Bind9ApiClient
8+ class ApiClient
109{
1110 private $ client ;
1211 private $ baseUrl ;
You can’t perform that action at this time.
0 commit comments