pnut 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +12 -13
  4. data/lib/pnut/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0dc1e258cbd8312f982cdca26fc3d91a1f89b76404fd4fad70b0c5e2dc05eaf
4
- data.tar.gz: aa847de8be6b0f7d3f0135463a4cb73c63e786944735b43e4382f11f3da5104a
3
+ metadata.gz: 9b2a3a8f1260f96e01bdf32d7df84081c7947db3e3f4bc8c38de75e88c6b0ceb
4
+ data.tar.gz: 4d46cce57a1453efb6ed7ac760c15e1f461c2de5e0b78fcd4a14e91ae5173379
5
5
  SHA512:
6
- metadata.gz: be6d49a9e2802cf4e59330e7082a474835af45fee278e391ec4188b7557945ca6811de55e28379e3dfa18d80c97431f3ddf70dc4d9292df73f51f0affbba8d1f
7
- data.tar.gz: 3d8a58129d640088847886b94e0bf308eefd7b713d28ab911f23c59a7dc309c6eee58a99f67987cba9ff1a71201499abe952a4458e2287c1adf9467c382c40b6
6
+ metadata.gz: 253def5b328479e324be828a6f5789541a6974146f023d3a01528b3d9c83f9726df40690c22bdaafdeb17f8f133438bf0ff7610f5777fa90c532440c53db9526
7
+ data.tar.gz: 87a5eefdbfad35a00a9ad0cfe5f66bae5f43a44414b8549fb6c561d3a30890da31b615110efd292747e359c7d017d29c7c5ba1d679947c1e4b37e8079f17593d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pnut (0.1.0)
4
+ pnut (0.1.2)
5
5
  addressable (~> 2.5)
6
6
  faraday
7
7
  webmock (~> 3.4)
data/README.md CHANGED
@@ -20,18 +20,26 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- The goal of the project is to provide a convenient method for every possible endpoint. For example, if you want to fetch the global timeline and get back an array containing "meta" and "data" as described in the [official documentation of the pnut.io API](https://pnut.io/docs/api/implementation/overview):
23
+ The goal of the project is to provide a convenient method for every possible endpoint. For example, if you want to fetch the global timeline and get back struct containing "meta" and "data" as described in the [official documentation of the pnut.io API](https://pnut.io/docs/api/implementation/overview):
24
24
 
25
25
  ```ruby
26
26
  require "pnut"
27
27
 
28
28
  pnut = Pnut::Client.new
29
- pnut.global
29
+ response = pnut.global
30
+
31
+ p response.meta # meta response with HTTP status code etc.
32
+ p response.data # data response, an array of the current posts
30
33
  ```
31
34
 
32
- Check the docs of this Gem for an overview of all implemented methods.
35
+ Most endpoints need a proper Bearer token for authorization. Simply initialize like this to get access:
36
+
37
+ ```ruby
38
+ pnut = Pnut::Client.new(:authorization_token: "YOURTOKEN")
39
+ pnut.unified
40
+ ```
33
41
 
34
- If we didn't implement an endpoint yet, you can use the `request` method to send custom requests:
42
+ If we didn't implement an endpoint yet (check the Gems docs to see what is available), you can use the `request` method to send custom requests:
35
43
 
36
44
  ```ruby
37
45
  require "pnut"
@@ -40,13 +48,6 @@ pnut = Pnut::Client.new
40
48
  pnut.request("/posts/streams/global")
41
49
  ```
42
50
 
43
- Most endpoints need a proper Bearer token for authorization. Simply initialize like this to get access:
44
-
45
- ```ruby
46
- pnut = Pnut::Client.new(:authorization_token: "YOURTOKEN")
47
- pnut.unified
48
- ```
49
-
50
51
  For POST, DELETE, etc. request, the method signature provides the following:
51
52
 
52
53
  ```ruby
@@ -63,8 +64,6 @@ pnut.request(
63
64
 
64
65
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
65
66
 
66
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
67
-
68
67
  ## Contributing
69
68
 
70
69
  Bug reports and pull requests are welcome on GitHub at https://github.com/kaiwood/pnut-ruby.
@@ -1,3 +1,3 @@
1
1
  module Pnut
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnut
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
  - Kai Wood