esnek 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -52,6 +52,12 @@ In order to post a JSON data simply pass a block (do...end)
52
52
  res = gapi.urlshortener.v1.url.post {{:longUrl => "http://www.sayarus.com/"}}
53
53
  puts res.longUrl # Use res.table[:id] instead of res.id, because id method already exist for Object
54
54
 
55
+ === Facebook Graph API
56
+ require 'esnek'
57
+ fb = Esnek.new('http://graph.facebook.com')
58
+ res = fb.send(:"http://www.wsirussia.ru").get
59
+ puts res.shares
60
+
55
61
  == Proxy
56
62
 
57
63
  Esnek will use the proxy specified by RestClient.proxy:
data/lib/esnek/base.rb CHANGED
@@ -22,7 +22,7 @@ class Esnek
22
22
  @chain = []
23
23
 
24
24
  resp = block_given? ? RestClient.send(method_sym, url, data,:params => params,:content_type => :json, :accept => :json) :
25
- RestClient.send(method_sym, url,:params => params)
25
+ RestClient.send(method_sym, url,:params => params,:content_type => :json, :accept => :json)
26
26
 
27
27
  if resp.headers[:content_type].include?('application/json')
28
28
  r = OpenStruct.new JSON.parse resp
data/lib/esnek/version.rb CHANGED
@@ -1 +1 @@
1
- ESNEK_VERSION='0.2.0'
1
+ ESNEK_VERSION='0.2.1'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esnek
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alper Akgun
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-19 00:00:00 Z
18
+ date: 2011-04-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json