generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates changelog and readme, adds remaining xibo api endpoints
- Loading branch information
Showing
34 changed files
with
1,393 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
|
||
namespace Wimmie\XiboApi\Categories; | ||
|
||
|
||
use Wimmie\XiboApi\XiboApi; | ||
|
||
class DatasetColumn extends CategoryWithCrud | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
protected string $name = 'dataset/{datasetId}/column'; | ||
|
||
public function __construct(XiboApi $xiboApi, int $datasetId) | ||
{ | ||
$this->name = str_replace('{datasetId}', $datasetId, $this->name); | ||
parent::__construct($xiboApi); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
|
||
namespace Wimmie\XiboApi\Categories; | ||
|
||
|
||
use Wimmie\XiboApi\XiboApi; | ||
|
||
class DatasetData extends Category | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
protected string $name = 'dataset/data/{datasetId}'; | ||
|
||
public function __construct(XiboApi $xiboApi, int $datasetId) | ||
{ | ||
$this->name = str_replace('{datasetId}', $datasetId, $this->name); | ||
parent::__construct($xiboApi); | ||
} | ||
|
||
/** | ||
* Search | ||
* @return mixed | ||
*/ | ||
public function get() | ||
{ | ||
$url = $this->xiboApi->generateUrl($this->name); | ||
return $this->xiboApi->sendRequest($url, XiboApi::REQUEST_GET); | ||
} | ||
|
||
/** | ||
* Add | ||
* @param array $data | ||
* @return mixed | ||
*/ | ||
public function add(array $data) | ||
{ | ||
$url = $this->xiboApi->generateUrl($this->name); | ||
return $this->xiboApi->sendRequest($url, XiboApi::REQUEST_POST, $data); | ||
} | ||
|
||
/** | ||
* Edit | ||
* @param int $id | ||
* @param array $data | ||
* @return mixed | ||
*/ | ||
public function edit(int $id, array $data) | ||
{ | ||
$url = $this->xiboApi->generateUrl($this->name, null, $id); | ||
return $this->xiboApi->sendRequest($url, XiboApi::REQUEST_PUT, $data); | ||
} | ||
|
||
/** | ||
* Delete | ||
* @param int $id | ||
* @return mixed | ||
*/ | ||
public function delete(int $id) | ||
{ | ||
$url = $this->xiboApi->generateUrl($this->name, null, $id); | ||
return $this->xiboApi->sendRequest($url, XiboApi::REQUEST_DELETE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
|
||
namespace Wimmie\XiboApi\Categories; | ||
|
||
|
||
use Wimmie\XiboApi\XiboApi; | ||
|
||
class DatasetRss extends CategoryWithCrud | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
protected string $name = 'dataset/{datasetId}/rss'; | ||
|
||
public function __construct(XiboApi $xiboApi, int $datasetId) | ||
{ | ||
$this->name = str_replace('{datasetId}', $datasetId, $this->name); | ||
parent::__construct($xiboApi); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.