weibo_api 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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -0
  3. data/lib/weibo_api/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c7b7a4ebe51199eec6b539b0c06bf438a07202ac5e20f9bd19884835b9f58b6
4
- data.tar.gz: c028601b537728c045072fd882e532aa72574f4e82639388e04588bcda6260bf
3
+ metadata.gz: f914137b49ad24082e164bf9ae293aec0ccb6cf8fcf8bf412a1ec6e43709716e
4
+ data.tar.gz: 287acd7407ebe42df35a35f44c9994e972b8b0f481377bc003a7dff4cf5c05ba
5
5
  SHA512:
6
- metadata.gz: f45796f89cd07a4ba30c2d9b37df060f4c0077be73b100845e894fa31762ed09ce5b43dbc514e832e8269301a1abb76fa94d58667a34015c310187fe5db4d706
7
- data.tar.gz: 599e4dcaad8f3f67638362fd80e3c47dcf255c3424f7405104af45b093705440e1458917f1a57641bc2b181d01f889c28639e95a171157424476ace46453539c
6
+ metadata.gz: 481db9a5c9e1a2919b1af0494b9c9891274260a2899d7acebc062b9e8e6a66c4f08d0936584d32e2233d14503a7e7172533151f5332b7b365fca2df0b8363f37
7
+ data.tar.gz: e9e895118ce70625342805903b7048e64a53217e9a6f1c168e7883565ec112543693a6cf1949445e2016c3a748278880ddb10769822b799b6e2a33cb69695404
data/README.md CHANGED
@@ -28,6 +28,31 @@ WeiboApi.config do |config|
28
28
  end
29
29
  ```
30
30
 
31
+ All methods return a hash
32
+
33
+ ```ruby
34
+ # the access_token and the uid can be find with the omniauth gem https://github.com/beenhero/omniauth-weibo-oauth2
35
+ weibo_user = WeiboApi::User.new(access_token, uid)
36
+
37
+ # get the user info
38
+ weibo_user.info
39
+
40
+ # get the lastest weibos of the user
41
+ weibo_user.timeline
42
+
43
+ # or just find one specific
44
+ weibo_user.show_status(weibo_id)
45
+
46
+ # do a custom search
47
+ weibo_user.custom_request('/comments/to_me')
48
+ ```
49
+
50
+ Methods can take parameters (available on the [official documentation](http://open.weibo.com/wiki/API))
51
+
52
+ ```ruby
53
+ weibo_user.timeline(page: pages_count, since_id: starting_id)
54
+ ```
55
+
31
56
  ## Contributing
32
57
 
33
58
  Bug reports and pull requests are welcome on GitHub at https://github.com/ocarta-l/weibo_api.
@@ -1,3 +1,3 @@
1
1
  module WeiboApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weibo_api
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
  - Oren Carta-Lag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-27 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler