nohead 0.1.0 → 0.2.0

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: b3b6ddca7dac0c2e2e1056aabba232a26b27fce7eae7eea1244519a88d0388fe
4
- data.tar.gz: e9c0c92435a093999388ef2a84c73870c12dead425ada3c3bdf691c9fe993069
3
+ metadata.gz: a8863cd35d5aaae50fb05907a1a5695db73f53ea9c89ffb2c2f098c5e51b1864
4
+ data.tar.gz: 247129f90aaaf38df24440aca69fb0beb30e8f9d2e57d59f4e5d45119f64a0ba
5
5
  SHA512:
6
- metadata.gz: 3ab6ef2e8d3d027b07a2ff536cf3f14833970b4d80cbc51fcf2b65a3a10684012a4a1e70088b426e0c77a55927a21f2816d13991c869321bbdff84d705d30f8c
7
- data.tar.gz: 2c73018868bc99808615f989f735149122b655705eac1f0af62a9bccfab465582857bbad1fb91a5f635230f2af272404f831d20e05f2387295ada5b901b0798a
6
+ metadata.gz: 648052049944a211a868972854133e2fc4fe1197ae09611fb933fe89c18e5d9cf4d97a19054ea26924b80fe4f6f70ee05b6f8dda524c8348298d6f6ceb68e190
7
+ data.tar.gz: 4c3455477a8fb32bf792d9eb1d5f184876febf275a141654f68c91cff53e33f526321a6e9a187712eea6b23e538eab094e51756cbfcbf9eaaa4b5f3fcc67b85a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ Changes to the `nohead` gem that you can notice. Versions follow
5
5
  releases; a change that could break your code is a major one. Each release's
6
6
  section is its GitHub release's notes.
7
7
 
8
+ ## 0.2.0
9
+
10
+ - Types follow the API's current contract. They add types only for
11
+ operations an API key can't call, so no method changed.
12
+
8
13
  ## 0.1.0
9
14
 
10
15
  The first release.
data/README.md CHANGED
@@ -12,7 +12,7 @@ nohead.records.list("posts", filter: { status: "published" }).each do |post|
12
12
  end
13
13
  ```
14
14
 
15
- > **Status:** 0.x, not yet published to RubyGems. Until it is, use it from GitHub: `gem "nohead", github: "nohead-io/nohead-ruby"`.
15
+ > **Status:** 0.x until the Nohead API launches.
16
16
 
17
17
  ## Contents
18
18
 
@@ -281,7 +281,7 @@ bundle exec rake samples # after changing test/calls.rb (the docs' code sampl
281
281
 
282
282
  - `openapi.json` is the API's published contract. `rake generate` derives the operation table, `lib/nohead/operations.rb`, from it.
283
283
  - The methods are written by hand.
284
- - `test/contract_test.rb` runs every call in `test/calls.rb`. It fails when an API-key operation in the contract has no method, or when a request doesn't match its operation.
284
+ - `test/contract_test.rb` runs every call in `test/calls.rb`. It fails when an API-key operation in the contract has no method, when a query parameter is never sent (no method takes it, or no call passes it), or when a request doesn't match its operation.
285
285
 
286
286
  The smoke test (`smoke/smoke.rb`) runs the core flow against a real API, with the gem as installed from its built package. Nohead's own CI runs it on every API contract change.
287
287
 
@@ -38,8 +38,12 @@ module Nohead
38
38
  @client.request("assets_complete", path: { asset_id: asset }, idempotency_key: idempotency_key)
39
39
  end
40
40
 
41
- def list(deleted: nil, limit: nil, cursor: nil)
42
- @client.paginate("assets_list", query: { deleted: deleted, limit: limit, cursor: cursor })
41
+ # `content_type` lists only assets of those MIME types or `type/*`
42
+ # wildcards (["image/*", "application/pdf"]), for example the ones an
43
+ # asset field accepts (its `accepted_types`).
44
+ def list(content_type: nil, deleted: nil, limit: nil, cursor: nil)
45
+ @client.paginate("assets_list", query: { content_type: content_type, deleted: deleted,
46
+ limit: limit, cursor: cursor })
43
47
  end
44
48
 
45
49
  def get(asset)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nohead
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nohead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nohead