API List Lesson Plans

Api List Lesson Plans

Get a list of all FunShine lesson plans created by the user. The api token must be valid. The user email must be active on FunShine. An array of lesson plans will be returned along with a count of the number of plans and an error code and error message. Each lesson plan will have an array of the days (with dates) included in the plan and the number of activities for each date.

Get call format:
http://www.funshineonline.com/api/listLessonPlans.php?api_token=:token&email=:email&date1=:yyyy-mm-dd&date2=:yyyy-mm-dd
- api_token : required, 32 character token (click here to see instructions on setting up a token)
- email : required, FunShine Online login ID (click here to see instructions to get a list of users and their email IDs)
- date1 : optional, format yyyy-mm-dd, defaults to first day of the current month
- date2 : optional, format yyyy-mm-dd, defaults to the last day of the current month

Object:

Format json
{
    "lesson_weeks": [
        {
            "id": "14735",
            "theme": "Ranches (0-35 Months)",
           "tags": [
                {
                    "0": "Number 1-20",
                    "1": "Letter A-Z",
                    "2": "Color Review Colors",
                    "3": "Shape Review Shapes"
                },
            ]
           "lesson_plans": [
                {
                    "lesson_plan_date": "2015-06-22",
                    "count_of_activities": "4",
                    "daily_url": "https://funshineonline.com/previewpdf.html?fordt=06/22/2015"
                },
                {
                    "lesson_plan_date": "2015-06-23",
                    "count_of_activities": "4",
                    "daily_url": "https://funshineonline.com/previewpdf.html?fordt=06/23/2015"
                },
                {
                    "lesson_plan_date": "2015-06-24",
                    "count_of_activities": "3",
                    "daily_url": "https://funshineonline.com/previewpdf.html?fordt=06/24/2015"
                },
                {
                    "lesson_plan_date": "2015-06-25",
                    "count_of_activities": "3",
                    "daily_url": "https://funshineonline.com/previewpdf.html?fordt=06/25/2015"
                },
                {
                    "lesson_plan_date": "2015-06-26",
                    "count_of_activities": "4",
                    "daily_url": "https://funshineonline.com/previewpdf.html?fordt=06/26/2015"
                }
            ]
        }
    ],
    "count": 1,
    "error_code": 0,
    "error_message": "Successful."
}

Example:
PHP:
$listurl = "http://www.funshineonline.com/api/listLessonPlans.php?api_token=" . $token . "&email=" . $email . "&date1=2015-06-01&date2=2015-06-30";
$jsonData = file_get_contents($listurl);
$theData = json_decode($jsonData, true);
print_r($theData);

Back