Listing content

We have 2000+ videos for Math, Physics and Chemistry, and are releasing more every week. To play these videos, you will need tokens (see Playing Videos)

Our curriculum is broken down into: Courses - the main subjects such as Math, Physics, English, Economics etc... Sections - Major section within each course (like "Algebra" or "Statistics" for Math), equivalent to "Chapters" in a book Subsections - Smaller subsections within each section Lessons - Lessons - groups of videos which are related to a particular topic (e.g. Number bases) * Videos - Individual videos, which are between 2 and 5 minutes long, explaining a particular concept

The heirarchy is Courses -> Sections -> Lessons -> Videos

To access view our curriculum programatically, you can use our API or our Android Library

API

You can access the API via GET calls to https://api.dotlearn.io/curriculum/..., which will return responses in JSON format.

Courses

To list available courses, submit a GET request to https://api.dotlearn.io/curriculum/courses, which will return a JSON array as shown below

    [
        {
          "name": "Mathematics",
          "id": "math"
        },
        {
          "name": "Physics",
          "id": "physics"
        },

        {
          "name": "Chemistry",
          "id": "chemistry"
        }
    ]

Get videos

You can list the available videos in a course, by submitting a GET request to https://api.dotlearn.io/curriculum/videos/in/course/[course-id], so for example, to list all videos in the math course, it would be https://api.dotlearn.io/curriculum/videos/in/course/math

It will return an array of video objects, as shown below

    [
        {
          "id": "0554fc1d-e75a-4612-aae0-c2e476e1fb62",
          "name": "Pt.1_adding of number bases",
          "version": 1,
          "type": "video"
        },

        ...
    ]

You will need the video IDS to play the vides (see the Playing Videos section)).

Sections, Subsections and Lessons

Remember, the heirarchy for the curriculum is Courses -> Sections -> Subsections -> Lessons -> Videos

To find sections in a course, you can use

https://api.dotlearn.io/curriculum/sections/in/course/[course-id]

To find subsections in a section, you can use

https://api.dotlearn.io/curriculum/subsections/in/section/[section-id]

To find lessons in a subsection, you can use

https://api.dotlearn.io/curriculum/lessons/in/subsection/[subsection-id]

To find videos in a lesson, you can use

https://api.dotlearn.io/curriculum/videos/in/lessson/[lesson-id]

You can also search for videos in a section

https://api.dotlearn.io/curriculum/videos/in/section/[section-id]

and lessons in a course

https://api.dotlearn.io/curriculum/lessons/in/course/[course-id]

etc....

Searching

Instead of browsing each topic, you can also search for terms, using the following API

https://api.dotlearn.io/curriculum/search/[term]/course/[course-id]

For example,

https://api.dotlearn.io/curriculum/search/geometry/course/math

Android

LRNCurriculum is a simple library that you can plugin to your Android apps to quickly get the curriculum from dot Learn servers.

Install

The Gradle dependency is available via jCenter. jCenter is the default Maven repository used by Android Studio.

Add this in your (app) module's build.gradle file:

    implementation 'io.dotlearn.lrncurriculum:1.2.2'

Basic Tutorial

Intro

The curriculum is made up of four main types of objects listed below: Courses ↓ Sections ↓ Lessons ↓ Videos

  1. Course - This is also called a subject.
  2. Section - A collection of related lessons. Can also be called topics
  3. Lesson - A collection of videos explaining a concept
  4. Video - A lesson video

Usually, you will follow the steps below when using this library: 1. Load all available courses 2. When a course is clicked, load all the sections in the clicked course 3. When a section is clicked, load all lessons in the clicked section 4. When a lesson is clicked, load all the videos in the lesson 5. When a video is clicked, play the selected video using the LRNPlayerView

Initializing

Before making any calls to the library, ensure that you have called the init function (preferably in your Application class onCreate method):

    CurriculumProvider.init(context)

You can safely call the init function on the main UI thread, as it doesn't block. All other functions from the CurriculumProvider class are synchronous and they block until the task is completed. You will have to call them from a different thread to avoid the NetworkOnMainThreadException

Load all available courses

Use the code below to load a list of all available courses

    try {
        val courses = CurriculumProvider.getCourses()
    }
    catch (e: Exception) {
        e.printStackTrace()
        // An error occurred connecting to the server or loading the local curriculum
    }

Load sections in a course

Use the code below to load all sections in a course

    try {
        val sections = CurriculumProvider.getSections(courseId)
    }
    catch (e: Exception) {
        e.printStackTrace()
        // An error occurred connecting to the server or loading the local curriculum
    }

Load lessons in a section

To load all the lessons in a section, use the code below

    try {
        val lessons = CurriculumProvider.getLessons(sectionId)
    }
    catch (e: Exception) {
        e.printStackTrace()
        // An error occurred connecting to the server or loading the local curriculum
    }

Load videos in a lesson

Finally, to load all the videos in a lesson, use the code below

    try {
        val videos = CurriculumProvider.getVideos(sectionId)
    }
    catch (e: Exception) {
        e.printStackTrace()
        // An error occurred connecting to the server or loading the local curriculum
    }

Additional functionality

The tutorial above was just a basic example/flow. There are a few other functions that allows you to jump a few steps down the tree.

1. Search for videos with a specific name

You can easily search for videos in a particular course using the code below

    try {
        val videos = CurriculumProvider.searchVideos(searchQuery, courseId)
    }
    catch (e: Exception) {
        e.printStackTrace()
        // An error occurred connecting to the server or loading the local curriculum
    }

When you make a request for a particular item for the first time a request is made to the server to download the item. Subsequent request for that item will be served from a local database. This local database can get stale over time and you might want to have a Service that runs periodically (like every x days) to update the local database. We created a helper class called CurriculumSync that you can use in your background service to update the local database.

CurriculumSync provides two helper functions:

    // This updates all the courses, sections and lessons in the local database. It is faster
    CurriculumSync.shallowSyncAll()

    // This updates all the courses, sections, lessons and modules in the local database. It is
    // quite slower
    CurriculumSync.deepSyncAll()

That's all. You can see all this in action in the CurriculumActivity in the sample project in the app module.