Class: XodClient::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/xod_client/config.rb

Instance Method Summary collapse

Instance Method Details

#endpointsObject

rubocop:disable MethodLength



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/xod_client/config.rb', line 21

def endpoints
  @endpoints ||= {
    token_details:                           '/api/v1/TokenDetails',
    queries:                                 '/api/v1/Queries',
    scopes:                                  '/api/v1/Scopes',
    logs:                                    '/api/v1/TokenDetails',
    usage:                                   '/api/v1/Usage',
    gdpr_ids:                                '/api/v1/GDPRIDs',
    'edubase.search'                      => '/api/v1/RunQuery/?id=edubase.search',
    'school.achievementfordaterange'      => '/api/v1/School/{estab}/AchievementForDateRange/{id}',
    'school.achievementfortoday'          => '/api/v1/School/{estab}/AchievementForToday/{id}',
    'school.agencyagent'                  => '/api/v1/School/{estab}/AgencyAgent/',
    'school.assessmentresults'            => '/api/v1/School/{estab}/assessmentresults/',
    'school.assessmentresultsbyaspect'    => '/api/v1/School/{estab}/assessmentresults/',
    'school.assessmentresultsbymarksheet' => '/api/v1/School/{estab}/assessmentresults/',
    'school.assessmentresultsbystudent'   => '/api/v1/School/{estab}/assessmentresults/',
    'school.assessmentstructure'          => '/api/v1/School/{estab}/assessmentstructure/',
    'school.attendancecodes'              => '/api/v1/School/{estab}/AttendanceCodes/{id}',
    'school.attendancefordate'            => '/api/v1/School/{estab}/AttendanceForDate/{id}',
    'school.attendancefordaterange'       => '/api/v1/School/{estab}/AttendanceForDateRange/{id}',
    'school.behaviourfordaterange'        => '/api/v1/School/{estab}/BehaviourForDateRange/{id}',
    'school.behaviourfortoday'            => '/api/v1/School/{estab}/BehaviourForToday/{id}',
    'school.calendar'                     => '/api/v1/School/{estab}/Calendar/{id}',
    'school.conductfordaterange'          => '/api/v1/School/{estab}/ConductForDateRange/{id}',
    'school.conductfortoday'              => '/api/v1/School/{estab}/ConductForToday/{id}',
    'school.conductlookups'               => '/api/v1/School/{estab}/conductlookups/',
    'school.conductpoints'                => '/api/v1/School/{estab}/ConductPoints/{id}',
    'school.contacts'                     => '/api/v1/School/{estab}/Contacts/{id}',
    'school.counts'                       => '/api/v1/School/{estab}/Counts',
    'school.entitlementhistory'           => '/api/v1/School/{estab}/EntitlementHistory/{id}',
    'school.groups'                       => '/api/v1/School/{estab}/Groups/{id}',
    'school.health'                       => '/api/v1/School/{estab}/Health',
    'school.linkeddocuments'              => '/api/v1/School/{estab}/LinkedDocuments',
    'school.linkeddocumenttypes'          => '/api/v1/School/{estab}/LinkedDocumentTypes',
    'school.personcomms'                  => '/api/v1/School/{estab}/PersonComms/{id}',
    'school.photos'                       => '/api/v1/School/{estab}/Photos/{id}',
    'school.schoolinfo'                   => '/api/v1/School/{estab}/SchoolInfo',
    'school.seatingplans'                 => '/api/v1/School/{estab}/SeatingPlans',
    'school.sen'                          => '/api/v1/School/{estab}/SEN/{id}',
    'school.staff'                        => '/api/v1/School/{estab}/Staff/{id}',
    'school.staffabsence'                 => '/api/v1/School/{estab}/StaffAbsence/{id}',
    'school.staffcontracts'               => '/api/v1/School/{estab}/StaffContracts',
    'school.studentcontacts'              => '/api/v1/School/{estab}/StudentContacts/{id}',
    'school.studentexclusions'            => '/api/v1/School/{estab}/StudentExclusions/{id}',
    'school.studentmeals'                 => '/api/v1/School/{estab}/StudentMeals/{id}',
    'school.studentmedical'               => '/api/v1/School/{estab}/StudentMedical/{id}',
    'school.students'                     => '/api/v1/School/{estab}/Students/{id}',
    'school.studentschoolhistory'         => '/api/v1/School/{estab}/StudentSchoolHistory/{id}',
    'school.studentuserdefinedfields'     => '/api/v1/School/{estab}/studentuserdefinedfields/{id}',
    'school.timetable'                    => '/api/v1/School/{estab}/Timetable/',
    'school.timetableforstaff'            => '/api/v1/School/{estab}/TimetableForStaff/{id}',
    'school.timetableforstudent'          => '/api/v1/School/{estab}/TimetableForStudent/{id}',
    'school.timetablemodel'               => '/api/v1/School/{estab}/TimetableModel',
    'school.timetablestructure'           => '/api/v1/School/{estab}/TimetableStructure',
    'school.userdefinedfields'            => '/api/v1/School/{estab}/UserDefinedFields/{id}',
    'POST.Attendance'                     => '/api/v1/Attendance/{estab}/',
    'POST.AttendanceAsync'                => '/api/v1/AttendanceAsync/{estab}/',
    'POST.ConductAch'                     => '/api/v1/Writeback/Conduct',
    'POST.ConductAsync'                   => '/api/v1/Writeback/ConductAsync',
    'POST.ConductBeh'                     => '/api/v1/Writeback/Conduct',
    'POST.LessonAttendance'               => '/api/v1/Attendance/{estab}/',
    'POST.SeatingPlan'                    => '/api/v1/Writeback/SeatingPlan',
    'POST.efw.Detention'                  => '/api/v1/Writeback/?id=efw.Detention',
  }.with_indifferent_access
end

#login_urlObject



4
5
6
# File 'lib/xod_client/config.rb', line 4

def 
  'https://login.groupcall.com/idaas/sts/STS/GetToken'
end

#retry_optionsObject



12
13
14
# File 'lib/xod_client/config.rb', line 12

def retry_options
  { max: 2, interval: 0.25.seconds, backoff_factor: 2, retry_statuses: [500, 502, 503] }
end

#root_urlObject



8
9
10
# File 'lib/xod_client/config.rb', line 8

def root_url
  'https://xporter.groupcall.com'
end

#user_agentObject



16
17
18
# File 'lib/xod_client/config.rb', line 16

def user_agent
  'TeamSatchel XoD Client'
end