og_pilot_ruby 0.3.1 → 0.4.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/README.md +2 -2
- data/lib/og_pilot_ruby/client.rb +1 -1
- data/lib/og_pilot_ruby/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: 5c13264ba768430bb4aba5a662b4957fe73c01a87ac5ba953897b35335686ab3
|
|
4
|
+
data.tar.gz: 699f6f44f60db4eb9afb36a1eb17e6be4d3c80d8acabe0868140be522866d700
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd5ab6d159c8a38f0e1d89742e0112bdc258f3b16f1a770ac5427d0524a1082db68b92658b8be5666f43642092dbfb2a19b5e655b913c1ab29900c41bd229288
|
|
7
|
+
data.tar.gz: fdf1e6bb75fef728a3422f6ce47326744c8b8052ec53723df1cfe19a32ba6b140b433096f3f55858ed13a1b28bd69471e81db0da6b725410084f8dc09766f363
|
data/README.md
CHANGED
|
@@ -41,7 +41,7 @@ bin/rails og_pilot_ruby:install
|
|
|
41
41
|
|
|
42
42
|
## Usage
|
|
43
43
|
|
|
44
|
-
Generate an image URL (follows the redirect returned by OG Pilot). In Rails, you can skip the `require`:
|
|
44
|
+
Generate an image URL (the client sends a signed `POST` request, then follows the redirect returned by OG Pilot). In Rails, you can skip the `require`:
|
|
45
45
|
|
|
46
46
|
```ruby
|
|
47
47
|
require "og_pilot_ruby"
|
|
@@ -87,7 +87,7 @@ image_url = OgPilotRuby.create_blog_post_image(
|
|
|
87
87
|
|
|
88
88
|
## Parameters
|
|
89
89
|
|
|
90
|
-
All parameters are embedded in the signed JWT payload; the only query param is `token`.
|
|
90
|
+
The client sends `POST /api/v1/images` requests. All parameters are embedded in the signed JWT payload; the only query param is `token`.
|
|
91
91
|
The gem handles `iss` (domain) and `sub` (API key prefix) automatically.
|
|
92
92
|
|
|
93
93
|
### Core parameters
|
data/lib/og_pilot_ruby/client.rb
CHANGED
|
@@ -43,7 +43,7 @@ module OgPilotRuby
|
|
|
43
43
|
http.open_timeout = config.open_timeout if config.open_timeout
|
|
44
44
|
http.read_timeout = config.read_timeout if config.read_timeout
|
|
45
45
|
|
|
46
|
-
request = Net::HTTP::
|
|
46
|
+
request = Net::HTTP::Post.new(uri)
|
|
47
47
|
request["Accept"] = "application/json" if json
|
|
48
48
|
headers.each { |key, value| request[key] = value }
|
|
49
49
|
|