Advertisement
kamil321

Untitled

Sep 12th, 2024 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <?php
  2.  
  3. $routes->group('api', function($routes) {
  4.  
  5. // Group routes for the homepage
  6. $routes->group('homepage', function($routes) {
  7. $routes->group('live-video', function($routes) {
  8. $routes->get('get-live-video', 'Api/Homepage::getLiveVideo');
  9. $routes->get('get-total-user-watching-live-video', 'Api/Homepage::getTotalUserWatchingLiveVideo');
  10. });
  11. $routes->group('viral', function($routes) {
  12. $routes->get('get-viral-videos', 'Api/Homepage::getViralVideos');
  13. });
  14. $routes->group('local-experience', function($routes) {
  15. $routes->get('get-local-experience-videos', 'Api/Homepage::getLocalExperienceVideos');
  16. });
  17. });
  18.  
  19. // Group routes for VOD
  20. $routes->group('vod', function($routes) {
  21. $routes->group('viral', function($routes) {
  22. $routes->get('list', 'Api/VOD::getViralVideos');
  23. });
  24. $routes->group('local-experience', function($routes) {
  25. $routes->get('list', 'Api/VOD::getLocalExperienceVideos');
  26. });
  27. });
  28.  
  29. // Group routes for Videos
  30. $routes->group('videos', function($routes) {
  31. $routes->get('all', 'Api/Videos::getAllVideos');
  32. $routes->get('live', 'Api/Videos::getLiveVideos');
  33. $routes->get('viral', 'Api/Videos::getViralVideos');
  34. $routes->get('local-experience', 'Api/Videos::getLocalExperienceVideos');
  35.  
  36. // Detail Video Routes
  37. $routes->get('detail/live/(:num)', 'Api/Videos::getLiveVideoDetail/$1');
  38. $routes->get('detail/viral/(:num)', 'Api/Videos::getViralVideoDetail/$1');
  39. $routes->get('detail/local-experience/(:num)', 'Api/Videos::getLocalExperienceVideoDetail/$1');
  40. });
  41.  
  42. // Group routes for Advertisements
  43. $routes->group('ads', function($routes) {
  44. $routes->get('pre-roll', 'Api/Ads::getPreRollAds');
  45. $routes->get('mid-roll', 'Api/Ads::getMidRollAds');
  46. $routes->get('post-roll', 'Api/Ads::getPostRollAds');
  47. });
  48.  
  49. // Group routes for Rewards
  50. $routes->group('rewards', function($routes) {
  51. $routes->get('list', 'Api/Rewards::getRewardList');
  52. $routes->get('detail/(:num)', 'Api/Rewards::getRewardDetail/$1');
  53. $routes->post('claim', 'Api/Rewards::claimReward');
  54. $routes->get('history', 'Api/Rewards::getRewardHistory');
  55. });
  56. });
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement