atlas_rb 1.3.4 → 1.3.5
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/.version +1 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +1 -1
- data/lib/atlas_rb/compilation.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21def65708de4960bb66f35c923b37b4caff75a7eb4c17721abb2e20982c8afc
|
|
4
|
+
data.tar.gz: e75048782fac64edb37a5e8a4798b126a2939e70a38770f4b78848bfd77ca160
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e9a70d364d40dfc8f21b42d29c0eae9905b52d76858d855375af12590d2250f13b70af67be75d95384658041ac5676c37d4d78664cc8d8d623fab07cc45b246
|
|
7
|
+
data.tar.gz: ea5156c1b8f0c842ed2ad3dc342fafd3153c0d9fd733c73a840a6aa6f8ff404bdd1854e026502a6a1f0e4a94b8c7959c0f8596a961c6aa204a82c1f5ca559653
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
1
|
+
1.3.5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.5
|
|
4
|
+
|
|
5
|
+
### Added — `Compilation.list(q:)` title filter
|
|
6
|
+
|
|
7
|
+
`Compilation.list` accepts `q:`, a case-insensitive title substring
|
|
8
|
+
filter (Atlas v0.6.60, `GET /compilations?q=<term>`). The filter applies
|
|
9
|
+
before pagination, so the returned `"pagination"` block describes the
|
|
10
|
+
filtered result. Backs the Cerberus Add-to-set typeahead.
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
AtlasRb::Compilation.list(q: "course", nuid: "000000002")
|
|
14
|
+
```
|
|
15
|
+
|
|
3
16
|
## 1.3.4
|
|
4
17
|
|
|
5
18
|
### Added — Compilation (DRS "Sets") bindings
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/compilation.rb
CHANGED
|
@@ -57,10 +57,13 @@ module AtlasRb
|
|
|
57
57
|
#
|
|
58
58
|
# Defaults to the acting user's own Sets. Pass `owner:` to list another
|
|
59
59
|
# user's — that is admin-only and raises {AtlasRb::ForbiddenError} for
|
|
60
|
-
# anyone else. There is no public browse surface.
|
|
60
|
+
# anyone else. There is no public browse surface. Pass `q:` to narrow
|
|
61
|
+
# by case-insensitive title substring; the filter applies before
|
|
62
|
+
# pagination, so the `"pagination"` block describes the filtered result.
|
|
61
63
|
#
|
|
62
64
|
# @param owner [String, nil] NUID whose Sets to list (admin-only when it
|
|
63
65
|
# isn't the acting user). Omit for "my Sets".
|
|
66
|
+
# @param q [String, nil] case-insensitive title substring filter.
|
|
64
67
|
# @param page [Integer, nil] 1-indexed page number.
|
|
65
68
|
# @param per_page [Integer, nil] page size override.
|
|
66
69
|
# @param nuid [String, nil] optional acting user's NUID, forwarded as the
|
|
@@ -78,9 +81,13 @@ module AtlasRb
|
|
|
78
81
|
#
|
|
79
82
|
# @example Another user's Sets (admin)
|
|
80
83
|
# AtlasRb::Compilation.list(owner: "000000002", nuid: "000000004")
|
|
81
|
-
|
|
84
|
+
#
|
|
85
|
+
# @example Title typeahead
|
|
86
|
+
# AtlasRb::Compilation.list(q: "course", nuid: "000000002")
|
|
87
|
+
def self.list(owner: nil, q: nil, page: nil, per_page: nil, nuid: nil, on_behalf_of: nil)
|
|
82
88
|
params = {}
|
|
83
89
|
params[:owner] = owner if owner
|
|
90
|
+
params[:q] = q if q
|
|
84
91
|
params[:page] = page if page
|
|
85
92
|
params[:per_page] = per_page if per_page
|
|
86
93
|
AtlasRb::Mash.new(JSON.parse(
|