SAAS-1063: REST API for podcasts
Hierarchy routing is working Basic implentation of podcast INDEX and POST actions done
This commit is contained in:
parent
a444751397
commit
67db2c1d25
9 changed files with 391 additions and 9 deletions
34
airtime_mvc/application/services/PodcastService.php
Normal file
34
airtime_mvc/application/services/PodcastService.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
class Application_Service_PodcastService
|
||||
{
|
||||
/**
|
||||
* There is maximum of 50 podcasts allowed in the library - to limit
|
||||
* resource consumption. This function returns true if the podcast
|
||||
* limit has been reached.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function podcastLimitReached()
|
||||
{
|
||||
if (PodcastQuery::create()->count() >= 50) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given podcast URL is valid.
|
||||
*
|
||||
* @param $podcastUrl String containing the podcast feed URL
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function validatePodcastUrl($podcastUrl)
|
||||
{
|
||||
//TODO
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue