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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/lib/nohead/resources/assets.rb +6 -2
- data/lib/nohead/version.rb +1 -1
- 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: a8863cd35d5aaae50fb05907a1a5695db73f53ea9c89ffb2c2f098c5e51b1864
|
|
4
|
+
data.tar.gz: 247129f90aaaf38df24440aca69fb0beb30e8f9d2e57d59f4e5d45119f64a0ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
|
|
42
|
-
|
|
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)
|
data/lib/nohead/version.rb
CHANGED