Skip to content

transparentclassroom/tc-api-scripts

Repository files navigation

Transparent Classroom API Scripts

This is a collection of several API scripts using the Transparent Classroom API.

The scripts are meant to serve as examples of what is possible.

The documentation for the API is at http://transparentclassroom.com/api

Setup

Follow these instructions to run a script using ruby.

  1. Follow the instructions on http://transparentclassroom.com/api to get your API token. Then set it as an environment variable.

    export TC_API_TOKEN=my_api_token

  2. Optionally, set a masquerade_id:

    export TC_MASQUERADE_ID=masquerade_id

  3. Install gems bundle install

  4. Script specific setup

    1. pull_retention_rates.rb

      • Define optional config.yml (refer to config.template.yml)
    2. pull_all_children.rb

      • Set the SCHOOL_YEAR env var for the year of data you would like to pull, use the format YYYY-YY:

        export SCHOOL_YEAR=2018-19

  5. Run a script ruby ./pull_retention_rates.rb

Development

Point script to a different TC API endpoint by using the TC_API_BASE_URL env var (default: https://www.transparentclassroom.com/api/v1):

export ENV['TC_API_BASE_URL']=http://localhost/api/v1

About

Example scripts use the Transparent Classroom API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages