4.0.0 • Published 5 years ago

@datafire/clever v4.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/clever

Client library for Data API

Installation and Usage

npm install --save @datafire/clever
let clever = require('@datafire/clever').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Serves the Clever Data API

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

clever.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

clever.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

getContacts

Returns a list of student contacts

clever.getContacts({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string

Output

getContact

Returns a specific student contact

clever.getContact({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getDistrictForStudentContact

Returns the district for a student contact

clever.getDistrictForStudentContact({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getStudentForContact

Returns the student for a student contact

clever.getStudentForContact({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getDistrictAdmins

Returns a list of district admins

clever.getDistrictAdmins({}, context)

Input

  • input object
    • starting_after string
    • ending_before string
    • show_links string

Output

getDistrictAdmin

Returns a specific district admin

clever.getDistrictAdmin({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getDistricts

Returns a list of districts

clever.getDistricts(null, context)

Input

This action has no parameters

Output

getDistrict

Returns a specific district

clever.getDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • include string

Output

getAdminsForDistrict

Returns the admins for a district

clever.getAdminsForDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSchoolsForDistrict

Returns the schools for a district

clever.getSchoolsForDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSectionsForDistrict

Returns the sections for a district

clever.getSectionsForDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getDistrictStatus

Returns the status of the district

clever.getDistrictStatus({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getStudentsForDistrict

Returns the students for a district

clever.getStudentsForDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getTeachersForDistrict

Returns the teachers for a district

clever.getTeachersForDistrict({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSchoolAdmins

Returns a list of school admins

clever.getSchoolAdmins({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSchoolAdmin

Returns a specific school admin

clever.getSchoolAdmin({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • include string

Output

getSchoolsForSchoolAdmin

Returns the schools for a school admin

clever.getSchoolsForSchoolAdmin({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getSchools

Returns a list of schools

clever.getSchools({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSchool

Returns a specific school

clever.getSchool({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getDistrictForSchool

Returns the district for a school

clever.getDistrictForSchool({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSectionsForSchool

Returns the sections for a school

clever.getSectionsForSchool({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getStudentsForSchool

Returns the students for a school

clever.getStudentsForSchool({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getTeachersForSchool

Returns the teachers for a school

clever.getTeachersForSchool({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSections

Returns a list of sections

clever.getSections({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getSection

Returns a specific section

clever.getSection({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getDistrictForSection

Returns the district for a section

clever.getDistrictForSection({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSchoolForSection

Returns the school for a section

clever.getSchoolForSection({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getStudentsForSection

Returns the students for a section

clever.getStudentsForSection({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getTeacherForSection

Returns the primary teacher for a section

clever.getTeacherForSection({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getTeachersForSection

Returns the teachers for a section

clever.getTeachersForSection({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getStudents

Returns a list of students

clever.getStudents({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getStudent

Returns a specific student

clever.getStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • include string

Output

getContactsForStudent

Returns the contacts for a student

clever.getContactsForStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer

Output

getDistrictForStudent

Returns the district for a student

clever.getDistrictForStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSchoolForStudent

Returns the primary school for a student

clever.getSchoolForStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSectionsForStudent

Returns the sections for a student

clever.getSectionsForStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getTeachersForStudent

Returns the teachers for a student

clever.getTeachersForStudent({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getTeachers

Returns a list of teachers

clever.getTeachers({}, context)

Input

  • input object
    • limit integer
    • starting_after string
    • ending_before string
    • where string

Output

getTeacher

Returns a specific teacher

clever.getTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • include string

Output

getDistrictForTeacher

Returns the district for a teacher

clever.getDistrictForTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getGradeLevelsForTeacher

Returns the grade levels for sections a teacher teaches

clever.getGradeLevelsForTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSchoolForTeacher

Retrieves school info for a teacher.

clever.getSchoolForTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string

Output

getSectionsForTeacher

Returns the sections for a teacher

clever.getSectionsForTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

getStudentsForTeacher

Returns the students for a teacher

clever.getStudentsForTeacher({
  "id": ""
}, context)

Input

  • input object
    • id required string
    • limit integer
    • starting_after string
    • ending_before string

Output

Definitions

BadRequest

  • BadRequest object
    • message string

Credentials

  • Credentials object
    • district_username string

District

  • District object
    • id string
    • mdr_number string
    • name string

DistrictAdmin

  • DistrictAdmin object
    • district string
    • email string
    • id string
    • name Name
    • title string

DistrictAdminResponse

DistrictAdminsResponse

DistrictResponse

DistrictStatus

  • DistrictStatus object
    • error string
    • id string
    • instant_login boolean
    • last_sync string
    • launch_date string
    • pause_end string
    • pause_start string
    • sis_type string
    • state string (values: running, pending, error, paused)

DistrictStatusResponse

DistrictStatusResponses

DistrictsResponse

GradeLevelsResponse

  • GradeLevelsResponse object
    • data array
      • items string

InternalError

  • InternalError object
    • message string

Location

  • Location object
    • address string
    • city string
    • lat string
    • lon string
    • state string
    • zip string

Name

  • Name object
    • first string
    • last string
    • middle string

NotFound

  • NotFound object
    • message string

Principal

  • Principal object
    • email string
    • name string

School

  • School object
    • created string
    • district string
    • high_grade string (values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other)
    • id string
    • last_modified string
    • location Location
    • low_grade string (values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other)
    • mdr_number string
    • name string
    • nces_id string
    • phone string
    • principal Principal
    • school_number string
    • sis_id string
    • state_id string

SchoolAdmin

  • SchoolAdmin object
    • credentials Credentials
    • district string
    • email string
    • id string
    • name Name
    • schools array
      • items string
    • staff_id string
    • title string

SchoolAdminResponse

SchoolAdminsResponse

SchoolResponse

  • SchoolResponse object

SchoolsResponse

Section

  • Section object
    • course_description string
    • course_name string
    • course_number string
    • created string
    • district string
    • grade string (values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other)
    • id string
    • last_modified string
    • name string
    • period string
    • school string
    • section_number string
    • sis_id string
    • students array
      • items string
    • subject string (values: english/language arts, math, science, social studies, language, homeroom/advisory, interventions/online learning, technology and engineering, PE and health, arts and music, other)
    • teacher string
    • teachers array
      • items string
    • term Term

SectionResponse

SectionsResponse

Student

  • Student object
    • created string
    • credentials Credentials
    • district string
    • dob string
    • ell_status string (values: Y, N, )
    • email string
    • gender string (values: M, F, )
    • grade string (values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other)
    • graduation_year string
    • hispanic_ethnicity string (values: Y, N, )
    • id string
    • last_modified string
    • location Location
    • name Name
    • race string (values: Caucasian, Asian, Black or African American, American Indian, Hawaiian or Other Pacific Islander, Two or More Races, Unknown, )
    • school string
    • schools array
      • items string
    • sis_id string
    • state_id string
    • student_number string

StudentContact

  • StudentContact object
    • district string
    • email string
    • id string
    • name string
    • phone string
    • phone_type string
    • relationship string
    • sis_id string
    • student string
    • type string

StudentContactResponse

StudentContactsForStudentResponse

  • StudentContactsForStudentResponse object

StudentContactsResponse

StudentResponse

StudentsResponse

Teacher

  • Teacher object
    • created string
    • credentials Credentials
    • district string
    • email string
    • id string
    • last_modified string
    • name Name
    • school string
    • schools array
      • items string
    • sis_id string
    • state_id string
    • teacher_number string
    • title string

TeacherResponse

TeachersResponse

Term

  • Term object
    • end_date string
    • name string
    • start_date string