API for musora websites
- Install via composer:
composer require railroad/musora-api:1.0
- Add service provider to your application laravel config app.php file:
use Railroad\MusoraApi\Providers\MusoraApiServiceProvider;'providers' => [
// ... other providers
MusoraApiServiceProvider::class,
],
- Publish the musora-api config file:
php artisan vendor:publish
-
Define middlewares, response structure and emails messages in musora-api.php config file( e.g.: Drumeo file)
-
Create chat, user and product providers ( e.g: MusoraApiChatProvider , MusoraApiUserProvider , MusoraApiProductProvider)
-
In AppServiceProvider boot method create instance for the providers:
app()->instance(ProductProviderInterface::class, app()->make(MusoraApiProductProvider::class));
app()->instance(ChatProviderInterface::class, app()->make(MusoraApiChatProvider::class));
app()->instance(UserProviderInterface::class, app()->make(MusoraApiUserProvider::class));
Endpoints | |
---|---|
Login | /musora-api/login |
Forgot password | /musora-api/forgot |
Change password | /musora-api/change-password |
Create Intercom user | /musora-api/intercom-user |
Endpoints | |
---|---|
Catalogues (filter contents) | /musora-api/all |
In-progress lists | /musora-api/in-progress |
Pull content | /musora-api/content/{contentId} |
Search | /musora-api/search |
My lists | /musora-api/my-list |
Packs list | /musora-api/packs |
Get pack | /musora-api/pack/{packId} |
Get pack's lesson | /musora-api/pack/lesson/{lessonId} |
Get next pack lesson | /musora-api/packs/jump-to-next-lesson/{packId} |
Leaning path(Method) | /musora-api/learning-paths/{learningPathSlug} |
Learning path level | /musora-api/learning-path-levels/{learningPathSlug}/{levelSlug} |
Leaning path course | /musora-api/learning-path-courses/{courseId} |
Learning path lesson | /musora-api/learning-path-lessons/{lessonId} |
Schedule list | /musora-api/schedule |
Live schedule list | /musora-api/live-schedule |
Live event | /musora-api/live-event |
Mark content as completed | /musora-api/complete |
Reset user content progress | /musora-api/reset |
Track media | /musora-api/media |
Save video progress | /musora-api/media/{sessionId} |
Submit question | /musora-api/submit-question |
Submit video | /musora-api/submit-video |
Submit student focus | /musora-api/submit-student-focus-form |
Get authenticated user profile | /musora-api/profile |
Upload avatar | /musora-api/avatar/upload |
Update user profile | /musora-api/profile/update |
Add default lessons to user's list | /musora-api/add-lessons |