clever 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/clever/client.rb +1 -14
- data/lib/clever/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba04605f8dd24c5294e0ad902c29df9296ce14e1
|
|
4
|
+
data.tar.gz: 275fecc1abefb5af4a08d146b38eca3acc24602a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a336127ba0c65de367f9ed9a027ab71baa411baf0ee2302e105a475665035d1a6ec9da5cbe1680adc6280acfacf2ae7ac9c8ec28b52837610a39cadacfbd5810
|
|
7
|
+
data.tar.gz: 1eea6ee645d14b4410dcab268a4508a23200faf724f77467c61822ba8a904e994f11871a39fefe3cc25bd1c633f0c45635aeb9c5676ec55fb6cb13c4fbec7134
|
data/Gemfile.lock
CHANGED
data/lib/clever/client.rb
CHANGED
|
@@ -54,7 +54,7 @@ module Clever
|
|
|
54
54
|
Paginator.fetch(connection, endpoint, :get, Types::Event, client: self).force
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
%i(students courses sections terms).each do |record_type|
|
|
57
|
+
%i(students courses teachers admins sections terms).each do |record_type|
|
|
58
58
|
define_method(record_type) do |record_uids = []|
|
|
59
59
|
authenticate
|
|
60
60
|
|
|
@@ -69,19 +69,6 @@ module Clever
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
def teachers(record_uids = [])
|
|
73
|
-
authenticate
|
|
74
|
-
|
|
75
|
-
teachers = Paginator.fetch(connection, Clever::TEACHERS_ENDPOINT, :get, Types::Teacher, client: self).force
|
|
76
|
-
admins = Paginator.fetch(connection, Clever::ADMINS_ENDPOINT, :get, Types::Admin, client: self).force
|
|
77
|
-
|
|
78
|
-
records = (admins + teachers).uniq(&:uid)
|
|
79
|
-
|
|
80
|
-
return records if record_uids.empty?
|
|
81
|
-
|
|
82
|
-
records.select { |record| record_uids.to_set.include?(record.uid) }
|
|
83
|
-
end
|
|
84
|
-
|
|
85
72
|
# discard params to make the API behave the same as the one roster gem
|
|
86
73
|
def classrooms(*)
|
|
87
74
|
authenticate
|
data/lib/clever/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: clever
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Julius
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-06-
|
|
11
|
+
date: 2021-06-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|