Class: Everlog::Inf::Api::Hatena

Inherits:
Everlog::Inf::Api show all
Defined in:
lib/everlog/inf/api/hatena.rb

Instance Method Summary collapse

Methods inherited from Everlog::Inf::Api

#initialize

Constructor Details

This class inherits a constructor from Everlog::Inf::Api

Instance Method Details

#clientObject



5
6
7
8
9
10
11
12
# File 'lib/everlog/inf/api/hatena.rb', line 5

def client
  @client ||= ::Hatena::Bookmark.new(
    consumer_key:    @config.consumer_key,
    consumer_secret: @config.consumer_secret,
    request_token:   @config.access_token,
    request_secret:  @config.access_secret
  )
end

#feed_entryObject



14
15
16
17
18
# File 'lib/everlog/inf/api/hatena.rb', line 14

def feed_entry
  client.feed['feed']['entry']
rescue => e
  raise InfrastructureHatenarError, "feed_entry error / #{e.message}"
end