contemble 0.1.1 → 0.1.2

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: 3e11de0b7a122b2a0e036240b764cda308ba26ce3a82b298d3e9a7333e70597e
4
- data.tar.gz: 95b4039dd5515f0c07d8f305e4dd994a09492f96213e7656b6166c9a46e0a3d6
3
+ metadata.gz: b928df155d770843df5d221649b1b468dc3f051d3b236033d2cce64e3ad00b55
4
+ data.tar.gz: 21e48f7a6381a182dd92db98694cd753695d31189187f9a3045411970fb83616
5
5
  SHA512:
6
- metadata.gz: 23c9a6586fc151ee597bc7ac1164310e5f78c9f12bff585dc3db49b806751f72eacb16bb5a44bfa85200116d77217c56347d28fdfb83873b7fc6164c960c8be2
7
- data.tar.gz: 6d298dd5bbd779f9fbf176db84e31f745fd3fa75d073c1b2663649c89798ca5121e8cb3a154dbc1f6144150669cb564f56c627395bb14249a58cab0fb2008f96
6
+ metadata.gz: cefa4889c058afa05d6b44ea20952ad97471a9fc3dea7002ad800cb57dc53ba7a47dd3fb04b8ab1fd66b3d590470a3a1cd3862bb874c7b60f666d34cac0b5c61
7
+ data.tar.gz: 98b09da9d6395c2f156bf49fa28046e74573e620fd0e4db94289b847046b586013c103224b0b0db555b9a73b29680d6541a16dd074a9e58386dd8143d7f3482f
data/README.md CHANGED
@@ -38,11 +38,29 @@ posts = client.collections.posts
38
38
  posts = client.collections.posts(collection_name: "blog")
39
39
 
40
40
  # Get individual post
41
- post = client.content.show(slug: "post-slug")
41
+ post = client.posts.show(slug: "post-slug")
42
42
  ```
43
43
 
44
- Each post includes a `url` field for easy linking based on your configured `post_path`.
44
+ ### Available Data
45
+
46
+ **Individual posts** include:
47
+
48
+ - `slug`, `title`, `sub_title`, `description`
49
+ - `meta_title`, `meta_description`
50
+ - `body` (HTML content)
51
+ - `published_at`
52
+ - `collection` (collection name)
53
+ - `featured_image`
54
+ - `url` (generated based on your configured `post_path`)
45
55
 
56
+ **Posts in collections** include:
57
+
58
+ - `slug`, `title`, `sub_title`, `description`
59
+ - `published_at`
60
+ - `featured_image`
61
+ - `url` (generated based on your configured `post_path`)
62
+
63
+ Each post includes a `url` field for easy linking based on your configured `post_path`.
46
64
 
47
65
  ## License
48
66
 
@@ -17,8 +17,8 @@ module Contemble
17
17
  @collections ||= Resources::Collections.new(self)
18
18
  end
19
19
 
20
- def content
21
- @content ||= Resources::Content.new(self)
20
+ def posts
21
+ @posts ||= Resources::Posts.new(self)
22
22
  end
23
23
 
24
24
  def get(path, params = {})
@@ -34,13 +34,13 @@ module Contemble
34
34
  end
35
35
  end
36
36
 
37
- class Content
37
+ class Posts
38
38
  def initialize(client)
39
39
  @client = client
40
40
  end
41
41
 
42
42
  def show(slug:)
43
- @client.get("/content/#{slug}")
43
+ @client.get("/posts/#{slug}")
44
44
  end
45
45
  end
46
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Contemble
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contemble
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - contemble