API: Media attachments are now supported

This commit is contained in:
Michael 2020-10-31 16:10:27 +00:00
parent 42d246ef73
commit e6030e5f82
5 changed files with 195 additions and 5 deletions

View file

@ -258,4 +258,16 @@ class Media
self::insert($media);
}
}
/**
* Retrieves the media attachments associated with the provided item ID.
*
* @param int $uri_id
* @return array
* @throws \Exception
*/
public static function getByURIId(int $uri_id)
{
return DBA::selectToArray('post-media', [], ['uri-id' => $uri_id]);
}
}