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

+24 -15
View File
@@ -29,9 +29,12 @@ class _calendars extends \IPS\Node\Api\NodeController
protected $class = 'IPS\calendar\Calendar';
/**
* GET /calendar/calendar
* GET /calendar/calendars
* Get list of calendars
*
* @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 calendars the authorized user can view will be included
* @return \IPS\Api\PaginatedResponse<IPS\calendar\Calendar>
*/
public function GETindex()
@@ -41,23 +44,30 @@ class _calendars extends \IPS\Node\Api\NodeController
}
/**
* GET /calendar/calendar/{id}
* GET /calendar/calendars/{id}
* Get specific calendar
*
* @param int $id ID Number
*
* @return \IPS\Api\PaginatedResponse<IPS\calendar\Calendar>
* @throws 1L364/1 INVALID_ID The calendar does not exist or the authorized user does not have permission to view it
* @return \IPS\calendar\Calendar
*/
public function GETitem( $id )
{
/* Return */
return $this->_view( $id );
try
{
return $this->_view( $id );
}
catch ( \OutOfRangeException $e )
{
throw new \IPS\Api\Exception( 'INVALID_ID', '1L364/1', 404 );
}
}
/**
* POST /calendar/calendar
* POST /calendar/calendars
* Create a calendar
*
* @apiclientonly
* @reqapiparam string title The calendar title
* @apiparam string color The calendar color (Hexadecimal)
* @apiparam int approve_events 0|1 Events must be approved?
@@ -65,18 +75,18 @@ class _calendars extends \IPS\Node\Api\NodeController
* @apiparam int approve_comments 0|1 Comments must be approved
* @apiparam int allow_reviews 0|1 Allow reviews
* @apiparam int approve_reviews 0|1 Reviews must be approved
*
* @return \IPS\calendar\Calendar
*/
public function POSTindex()
{
return $this->_create();
return new \IPS\Api\Response( 201, $this->_create()->apiOutput( $this->member ) );
}
/**
* POST /calendar/calendar/{id}
* POST /calendar/calendars/{id}
* Edit a calendar
*
* @apiclientonly
* @reqapiparam string title The calendar title
* @apiparam string color The calendar color (Hexadecimal)
* @apiparam int approve_events 0|1 Events must be approved?
@@ -84,22 +94,21 @@ class _calendars extends \IPS\Node\Api\NodeController
* @apiparam int approve_comments 0|1 Comments must be approved
* @apiparam int allow_reviews 0|1 Allow reviews
* @apiparam int approve_reviews 0|1 Reviews must be approved
*
* @return \IPS\calendar\Calendar
*/
public function POSTitem( $id )
{
$class = static::$class;
$class = $this->class;
$calendar = $class::load( $id );
$calendar = $this->_createOrUpdate( $calendar );
return $calendar;
return new \IPS\Api\Response( 201, $this->_createOrUpdate( $calendar )->apiOutput( $this->member ) );
}
/**
* DELETE /calendar/calendar/{id}
* DELETE /calendar/calendars/{id}
* Delete a calendar
*
* @apiclientonly
* @param int $id ID Number
* @return void
*/