pnut 0.1.0 → 0.1.1
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 +9 -2
- data/lib/pnut/version.rb +1 -1
- data/pnut.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e0dc1e258cbd8312f982cdca26fc3d91a1f89b76404fd4fad70b0c5e2dc05eaf
|
|
4
|
+
data.tar.gz: aa847de8be6b0f7d3f0135463a4cb73c63e786944735b43e4382f11f3da5104a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be6d49a9e2802cf4e59330e7082a474835af45fee278e391ec4188b7557945ca6811de55e28379e3dfa18d80c97431f3ddf70dc4d9292df73f51f0affbba8d1f
|
|
7
|
+
data.tar.gz: 3d8a58129d640088847886b94e0bf308eefd7b713d28ab911f23c59a7dc309c6eee58a99f67987cba9ff1a71201499abe952a4458e2287c1adf9467c382c40b6
|
data/README.md
CHANGED
|
@@ -29,7 +29,7 @@ pnut = Pnut::Client.new
|
|
|
29
29
|
pnut.global
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Check the docs for an overview
|
|
32
|
+
Check the docs of this Gem for an overview of all implemented methods.
|
|
33
33
|
|
|
34
34
|
If we didn't implement an endpoint yet, you can use the `request` method to send custom requests:
|
|
35
35
|
|
|
@@ -40,9 +40,16 @@ pnut = Pnut::Client.new
|
|
|
40
40
|
pnut.request("/posts/streams/global")
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
Most endpoints need a proper Bearer token for authorization. Simply initialize like this to get access:
|
|
44
|
+
|
|
43
45
|
```ruby
|
|
44
|
-
|
|
46
|
+
pnut = Pnut::Client.new(:authorization_token: "YOURTOKEN")
|
|
47
|
+
pnut.unified
|
|
48
|
+
```
|
|
45
49
|
|
|
50
|
+
For POST, DELETE, etc. request, the method signature provides the following:
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
46
53
|
pnut.request(
|
|
47
54
|
"/channels/123/messages",
|
|
48
55
|
method: "POST",
|
data/lib/pnut/version.rb
CHANGED
data/pnut.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.authors = ["Kai Wood"]
|
|
10
10
|
spec.email = ["kwood@kwd.io"]
|
|
11
11
|
|
|
12
|
-
spec.summary = %q{Convenient wrapper library around the
|
|
12
|
+
spec.summary = %q{Convenient wrapper library around the pnut.io API}
|
|
13
13
|
spec.homepage = "https://github.com/kaiwood/pnut-ruby"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pnut
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kai Wood
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-08-
|
|
11
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -151,5 +151,5 @@ rubyforge_project:
|
|
|
151
151
|
rubygems_version: 2.7.6
|
|
152
152
|
signing_key:
|
|
153
153
|
specification_version: 4
|
|
154
|
-
summary: Convenient wrapper library around the
|
|
154
|
+
summary: Convenient wrapper library around the pnut.io API
|
|
155
155
|
test_files: []
|