Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+20 -9
View File
@@ -32,6 +32,9 @@ class _forums extends \IPS\Node\Api\NodeController
* GET /forums/forums
* Get list of forums
*
* @apiparam int page Page number
* @apiparam int perPage Number of results per page - defaults to 25
* @note For requests using an OAuth Access Token for a particular member, only forums the authorized user can view will be included
* @return \IPS\Api\PaginatedResponse<IPS\forums\Forum>
*/
public function GETindex()
@@ -45,19 +48,26 @@ class _forums extends \IPS\Node\Api\NodeController
* Get specific forum
*
* @param int $id ID Number
*
* @return \IPS\Api\PaginatedResponse<IPS\forums\Forum>
* @throws 1F363/1 INVALID_ID The forum does not exist or the authorized user does not have permission to view it
* @return \IPS\forums\Forum
*/
public function GETitem( $id )
{
/* Return */
return $this->_view( $id );
try
{
return $this->_view( $id );
}
catch ( \OutOfRangeException $e )
{
throw new \IPS\Api\Exception( 'INVALID_ID', '1F363/1', 404 );
}
}
/**
* POST /forums/forums
* Create a forum
*
* @apiclientonly
* @reqapiparam string title The forum title
* @apiparam string description The forum description
* @apiparam string type normal|qa|redirect|category
@@ -71,13 +81,14 @@ class _forums extends \IPS\Node\Api\NodeController
*/
public function POSTindex()
{
return $this->_create();
return new \IPS\Api\Response( 201, $this->_create()->apiOutput( $this->member ) );
}
/**
* POST /forums/forums/{id}
* Edit a forum
*
* @apiclientonly
* @reqapiparam string title The forum title
* @apiparam string description The forum description
* @apiparam string type normal|qa|redirect|category
@@ -91,17 +102,17 @@ class _forums extends \IPS\Node\Api\NodeController
*/
public function POSTitem( $id )
{
$class = static::$class;
$class = $this->class;
$forum = $class::load( $id );
$forum = $this->_createOrUpdate( $forum );
return $forum;
return new \IPS\Api\Response( 201, $this->_createOrUpdate( $forum )->apiOutput( $this->member ) );
}
/**
* DELETE /forums/forums/{id}
* Delete a forum
*
* @apiclientonly
* @param int $id ID Number
* @return void
*/