API List Lesson Plan Activities

Api List Lesson Plan Activities

Get a list of all FunShine activities for one user, one date span. The api token must be valid. The user email must be active on FunShine. The date(s) must be valid. An array of activities will be returned along with a count of the number of activities and an error code and error message for each date in the date span. Each activity will have an ID, a title, a summary, a url link to display the activity, the aggregation type (or subject area), and the sequential order that the activity appears on the lesson plan.

Get call format:
http://www.funshineonline.com/api/listLessonPlanActivities.php?api_token=:token&email=:email&lpdate=:yyyy-mm-dd&lpdate2=: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)
- lpdate : required, format yyyy-mm-dd, indicates which date of the lesson plan to pull the activities or the start date of a date span
- lpdate2 : optional, format yyyy-mm-dd, indicates the last date of a date span to pull the activities

Object:

Format json
{
"dates": [
       {
           "date": "2016-07-20",
           "activity_count": "4",
           "daily_url": "https://funshineonline.com/previewpdf.html?fordt=07/20/2016",
           "activities": [
              {
                 "id": "6329",
                 "title": "Moo, Cow, Moo!",
                 "summary": "Children learn about cows today!",
                 "activity_url": "http://www.funshineonline.com/previewpdf.html?actid=6329&option=noprint&option2=nolog",
                 "aggregation_type": "Language Development",
                 "sequence": "1"
             },
             {
                "id": "6339",
                "title": "Cow Vest",
                "summary": "Children create and decorate festive cow vests.",
                "activity_url": "http://www.funshineonline.com/previewpdf.html?actid=6339&option=noprint&option2=nolog",
                "aggregation_type": "Cognitive Development",
                "sequence": "2"
            },
           {
                "id": "6345",
                "title": "Follow the Cowbell",
                "summary": "Children move from place to place with the ringing of a bell.",
                "activity_url": "http://www.funshineonline.com/previewpdf.html?actid=6345&option=noprint&option2=nolog",
                "aggregation_type": "Physical Development",
                "sequence": "3"
            },
           {
                "id": "6385",
                "title": "Pouring",
                "summary": "Children practice pouring with lots of different containers.",
                "activity_url": "http://www.funshineonline.com/previewpdf.html?actid=6385&option=noprint&option2=nolog",
                "aggregation_type": "Social/Emotional Development",
                "sequence": "4"
            }
          ],
         "error_code": "0",
        "error_message": "Successful."
      }
     "error_code": "0",
     "error_message": "Successful"
}
 
Example:
PHP:
$listurl = "http://www.funshineonline.com/api/listLessonPlanActivities.php?api_token=" . $token . "&email=" . $email . "&lpdate=" . $lpdate;
$jsonData = file_get_contents($listurl);
$theData = json_decode($jsonData, true);
print_r($theData);

Back