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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f1d65e6631474391c3971b939e6394049b6b5f4198a14ffd55bd5e9c51d2bbf
4
- data.tar.gz: d3371babc6a6aca8141a3692b399fd9989d5f8f29341ac376e3d1bed5850d0f4
3
+ metadata.gz: 21def65708de4960bb66f35c923b37b4caff75a7eb4c17721abb2e20982c8afc
4
+ data.tar.gz: e75048782fac64edb37a5e8a4798b126a2939e70a38770f4b78848bfd77ca160
5
5
  SHA512:
6
- metadata.gz: f9450d1ed3d4c77708b619c4c48686c35606cee0d8633d9fcd448440127398b613f2d664fb672bbfaccb0bf44143ccbf8731aac29e3d967f09b56177ab7517ae
7
- data.tar.gz: acb806ac1e60026594bac52eb124415439daa77ceb219cc5465dc961d16ab78b2dc481fe64256a5cbf109e67347170ac15e2f484fb7d19ea248b69406a950834
6
+ metadata.gz: 4e9a70d364d40dfc8f21b42d29c0eae9905b52d76858d855375af12590d2250f13b70af67be75d95384658041ac5676c37d4d78664cc8d8d623fab07cc45b246
7
+ data.tar.gz: ea5156c1b8f0c842ed2ad3dc342fafd3153c0d9fd733c73a840a6aa6f8ff404bdd1854e026502a6a1f0e4a94b8c7959c0f8596a961c6aa204a82c1f5ca559653
data/.version CHANGED
@@ -1 +1 @@
1
- 1.3.4
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atlas_rb (1.3.4)
4
+ atlas_rb (1.3.5)
5
5
  faraday (~> 2.7)
6
6
  faraday-follow_redirects (~> 0.3.0)
7
7
  faraday-multipart (~> 1)
@@ -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
- def self.list(owner: nil, page: nil, per_page: nil, nuid: nil, on_behalf_of: nil)
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(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlas_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cliff