$instance
$instance : \de\m4taiori\spiget4php\SpigetAPI
This is the main-class of spiget4php.
Use the getInstance function to create a new instance or get an existing instance.
$instance : \de\m4taiori\spiget4php\SpigetAPI
getAuthorList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of authors.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getAuthorReviews(string $author, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get the reviews of an specific author.
| string | $author | The authors name or id. |
| integer | $size | The results max. size. |
| integer | $page | The page you want to get. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getAuthorResources(string $author, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get the resources of an specific author.
| string | $author | The authors name or id. |
| integer | $size | The results max. size. |
| integer | $page | The page you want to get. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getCategoryList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of categories.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getCategoryResources( $category, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of resources of an specific category.
| $category | ||
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getResourceReviews(string $resource, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of resource-reviews of an specific resource.
| string | $resource | The resource you want to read the reviews of. |
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getResourceUpdates(string $resource, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of updates for an specific resource.
| string | $resource | The resource you want get the list for. |
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getResourceVersionList(string $resource, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a resources versions.
| string | $resource | The resource you want get the versions of. |
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getSearchResource(string $resource, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a resource-search results.
.
| string | $resource | The resource-name you're looking for.. |
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getResourceList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of resources.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getFreeResourceList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of free resources.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getPremiumResourceList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of premium resources.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getNewResourceList(integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of the newest resources.
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getResourcesForVersion( $version, $method = 'any', integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get a list of resources for an specific version of minecraft/spigot.
| $version | ||
| $method | ||
| integer | $size | The size of the list. |
| integer | $page | The page of the list. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getSearchAuthors(string $author, string $field = SPIGET4PHP_DEFAULT, integer $size = SPIGET4PHP_DEFAULT, integer $page = SPIGET4PHP_DEFAULT, string $sort = SPIGET4PHP_DEFAULT, array $fields = SPIGET4PHP_DEFAULT) : array
Get the search-result for an specific username.
| string | $author | The authors name or id. |
| string | $field | The field you want to search in. |
| integer | $size | The results max. size. |
| integer | $page | The page you want to get. |
| string | $sort | Sort the list with + for ascending and - for descending in front of the field you want to sort by. |
| array | $fields | The fields you want to receive. |
getInstance(string $useragent = 'Spiget4PHP') : \de\m4taiori\spiget4php\SpigetAPI
Get the current instance of the api-wrapper or create a new one.
| string | $useragent | The name of the wrappers-useragent. |
getResult( $function, $args = array(), $post = false) : array
Get the result of an api-request.
| $function | string The rest-function you want to access. |
|
| $args | array Assoc containing the arguments transmitted within the url. |
|
| $post | bool Use post instead of get. |