delivery-sdk-ruby 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/delivery/version.rb +1 -1
- metadata +2 -3
- data/lib/delivery-sdk-ruby.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0124b31b6b96545e6fe02212f7ba070f49106eedd636f55c8ef5e15eead4c19f
|
4
|
+
data.tar.gz: a04b2599fe5a136c58d277b56a1ad223ae9a90b71f54fd82e8a1477f3cb0d4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e50eaa03437cdd061cdc9ddf2d136277550f28293de0f435d46826b7832e8d73410e191147c258204fb79b22dd93edf1072b5e24ebbd2612142840438a62441
|
7
|
+
data.tar.gz: 4f84ea5bf1209c142b15375f4bd1132a7bc98194f6a931dc2c1eb95551841dc02e6ab138a11b9729b7c430aef92ad2566fb502248e7d2b39c443a398c6b38825
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[![Build Status](https://api.travis-ci.com/Kentico/kontent-delivery-sdk-ruby.svg?branch=master)](https://travis-ci.com/Kentico/kontent-delivery-sdk-ruby)
|
2
2
|
[![Join the chat at https://kentico-community.slack.com](https://img.shields.io/badge/join-slack-E6186D.svg)](https://kentico-community.slack.com)
|
3
3
|
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow&logoColor=white)](https://stackoverflow.com/tags/kentico-kontent)
|
4
|
-
[![Version](https://img.shields.io/gem/v/
|
4
|
+
[![Version](https://img.shields.io/gem/v/delivery-sdk-ruby.svg?style=flat)](https://rubygems.org/gems/delivery-sdk-ruby)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/b2e3fae28a2b2601d815/maintainability)](https://codeclimate.com/github/Kentico/kontent-delivery-sdk-ruby/maintainability)
|
6
6
|
[![Test coverage](https://api.codeclimate.com/v1/badges/b2e3fae28a2b2601d815/test_coverage)](https://codeclimate.com/github/Kentico/delivery-sdk-ruby/test_coverage)
|
7
7
|
|
@@ -30,17 +30,17 @@ bundle install
|
|
30
30
|
rails server
|
31
31
|
```
|
32
32
|
|
33
|
-
The site should be accessible at localhost:3000. You can also follow a step-by-step guide to creating a basic Rails application on the [Kentico
|
33
|
+
The site should be accessible at localhost:3000. You can also follow a step-by-step guide to creating a basic Rails application on the [Kentico Kontent Blog](https://kontent.ai/blog/creating-a-kentico-cloud-ruby-on-rails-application).
|
34
34
|
|
35
35
|
## Installation
|
36
36
|
|
37
37
|
To use the SDK in your own project, add the gem to your Gemfile:
|
38
38
|
|
39
39
|
```ruby
|
40
|
-
gem '
|
40
|
+
gem 'delivery-sdk-ruby'
|
41
41
|
```
|
42
42
|
|
43
|
-
Then run `bundle install`. You can also download the gem from [RubyGems.org](https://rubygems.org/gems/
|
43
|
+
Then run `bundle install`. You can also download the gem from [RubyGems.org](https://rubygems.org/gems/delivery-sdk-ruby). To use the SDK in an `.rb` file, you need to require it:
|
44
44
|
|
45
45
|
```ruby
|
46
46
|
require 'kontent-delivery-sdk-ruby'
|
@@ -48,7 +48,7 @@ require 'kontent-delivery-sdk-ruby'
|
|
48
48
|
|
49
49
|
## Creating a client
|
50
50
|
|
51
|
-
You will use `Kentico::Kontent::Delivery::DeliveryClient` to obtain content from Kentico
|
51
|
+
You will use `Kentico::Kontent::Delivery::DeliveryClient` to obtain content from Kentico Kontent. Create an instance of the client and pass your project ID:
|
52
52
|
|
53
53
|
```ruby
|
54
54
|
delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '<your-project-id>'
|
@@ -189,7 +189,7 @@ delivery_client.items('system.type'.eq 'coffee')
|
|
189
189
|
|
190
190
|
### Requesting the latest content
|
191
191
|
|
192
|
-
Kentico caches content using Fastly, so requests made to Kentico
|
192
|
+
Kentico caches content using Fastly, so requests made to Kentico Kontent may not be up-to-date. In some cases, such as when reacting to [webhook](https://developer.kenticocloud.com/docs/webhooks) notifications, you might want to request the latest content from your Kentico Kontent project.
|
193
193
|
|
194
194
|
You can bypass the cache and get the latest content using `request_latest_content`
|
195
195
|
|
@@ -286,7 +286,7 @@ You can then request the secure published content in your project. Be sure to no
|
|
286
286
|
|
287
287
|
## Retrieving content types
|
288
288
|
|
289
|
-
You can use the `.type` and `.types` methods to request your content types from Kentico
|
289
|
+
You can use the `.type` and `.types` methods to request your content types from Kentico Kontent:
|
290
290
|
|
291
291
|
```ruby
|
292
292
|
delivery_client.types.execute do |response|
|
@@ -355,7 +355,7 @@ end
|
|
355
355
|
|
356
356
|
## Retrieving content type elements
|
357
357
|
|
358
|
-
Kentico
|
358
|
+
Kentico Kontent provides an [endpoint](https://developer.kenticocloud.com/v1/reference#view-a-content-type-element) for obtaining details about a specific element of a content type. In the Ruby SDK, you can use the `.element` method:
|
359
359
|
|
360
360
|
```ruby
|
361
361
|
delivery_client.element('brewer', 'product_status').execute do |response|
|
data/lib/delivery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delivery-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dugre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -131,7 +131,6 @@ files:
|
|
131
131
|
- README.md
|
132
132
|
- bin/console
|
133
133
|
- bin/setup
|
134
|
-
- lib/delivery-sdk-ruby.rb
|
135
134
|
- lib/delivery/builders/image_transformation_builder.rb
|
136
135
|
- lib/delivery/builders/url_builder.rb
|
137
136
|
- lib/delivery/client/delivery_client.rb
|
data/lib/delivery-sdk-ruby.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/delivery/client/delivery_client'
|
2
|
-
require File.dirname(__FILE__) + '/delivery/client/delivery_query'
|
3
|
-
require File.dirname(__FILE__) + '/delivery/client/request_manager'
|
4
|
-
require File.dirname(__FILE__) + '/delivery/models/content_item'
|
5
|
-
require File.dirname(__FILE__) + '/delivery/models/content_type'
|
6
|
-
require File.dirname(__FILE__) + '/delivery/models/taxonomy_group'
|
7
|
-
require File.dirname(__FILE__) + '/delivery/query_parameters/filters'
|
8
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_item_listing_response'
|
9
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_item_response'
|
10
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_type_listing_response'
|
11
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_type_response'
|
12
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_listing_response'
|
13
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_taxonomy_response'
|
14
|
-
require File.dirname(__FILE__) + '/delivery/responses/delivery_element_response'
|
15
|
-
require File.dirname(__FILE__) + '/delivery/resolvers/content_link_resolver'
|
16
|
-
require File.dirname(__FILE__) + '/delivery/resolvers/inline_content_item_resolver'
|
17
|
-
require File.dirname(__FILE__) + '/delivery/resolvers/linked_item_resolver'
|
18
|
-
require File.dirname(__FILE__) + '/delivery/builders/image_transformation_builder'
|
19
|
-
require File.dirname(__FILE__) + '/delivery/tests/fake_responder'
|