medium-sdk-ruby 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/medium/posts.rb +4 -2
- data/lib/medium/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26ea0452bf599d07a852d848382b4faff98999f2
|
4
|
+
data.tar.gz: 955a488c92da17939ada13efb6d9554407fd78ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a9a898e8c93585211bef0dfa27681ce954880f7c82b70657791d9a77771cb1ef0ab5b13f5f61d64eb83c96f75f63b36d3a8c4f06632b3d496a44a9d46c8bad8
|
7
|
+
data.tar.gz: 6894330b473e539884b700e8df74156ea28bd891cf1768cfd0af80b383d23e71c5702d93a19053c287294da88bd3983c4f96f9e78a94a4867592816346c415d1
|
data/README.md
CHANGED
@@ -18,20 +18,20 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install medium
|
21
|
+
$ gem install medium-sdk-ruby
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
Create a client, then call commands on it.
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
require 'medium'
|
28
|
+
require 'medium-sdk-ruby'
|
29
29
|
|
30
30
|
# If you have a self-issued access token, you can create a new client directly:
|
31
31
|
client = Medium::Client.new integration_token: 'example_token'
|
32
32
|
|
33
33
|
# Get profile details of the user identified by the access token.
|
34
|
-
client.
|
34
|
+
client.users.me
|
35
35
|
```
|
36
36
|
|
37
37
|
## Development
|
data/lib/medium/posts.rb
CHANGED
@@ -30,8 +30,8 @@ module Medium
|
|
30
30
|
# }
|
31
31
|
# }
|
32
32
|
# ```
|
33
|
-
def create(opts)
|
34
|
-
@client.post "users/#{
|
33
|
+
def create(user, opts)
|
34
|
+
@client.post "users/#{user['data']['id']}/posts",
|
35
35
|
build_request_with(opts)
|
36
36
|
end
|
37
37
|
|
@@ -53,7 +53,9 @@ module Medium
|
|
53
53
|
hash[:tags] = opts[:tags] if opts.key? :tags
|
54
54
|
hash[:canonicalUrl] = opts[:canonical_url] if opts.key? :canonical_url
|
55
55
|
hash[:publishStatus] = opts[:publish_status] if opts.key? :publish_status
|
56
|
+
hash[:publishedAt] = opts[:published_at] if opts.key? :published_at
|
56
57
|
hash[:license] = opts[:license] if opts.key? :license
|
58
|
+
hash[:notifyFollowers] = opts[:notify_followers] if opts.key? :notify_followers
|
57
59
|
end
|
58
60
|
end
|
59
61
|
end
|
data/lib/medium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: medium-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Kirsche
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hurley
|
@@ -142,3 +142,4 @@ signing_key:
|
|
142
142
|
specification_version: 4
|
143
143
|
summary: Ruby SDK for interacting with the Medium API
|
144
144
|
test_files: []
|
145
|
+
has_rdoc:
|