Class: Hatena::Bookmark::Restful::V1::User
- Inherits:
-
Object
- Object
- Hatena::Bookmark::Restful::V1::User
- Includes:
- ResponseObject
- Defined in:
- lib/hatena/bookmark/restful/v1/user.rb
Constant Summary collapse
- STRING_PROPERTIES =
[:name]
- BOOLEAN_PROPERTIES =
[:plususer, :private, :is_oauth_twitter, :is_oauth_evernote, :is_oauth_facebook, :is_oauth_mixi_check]
- PROPERTIES =
STRING_PROPERTIES + BOOLEAN_PROPERTIES
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
User’s Hatena ID.
Instance Method Summary collapse
-
#oauth_evernote? ⇒ Boolean
Connected with Evernote using OAuth or not.
-
#oauth_facebook? ⇒ Boolean
Connected with Facebook using OAuth or not.
-
#oauth_mixi_check? ⇒ Boolean
Connected with mixi check using OAuth or not.
-
#oauth_twitter? ⇒ Boolean
Connected with Twitter using OAuth or not.
-
#plususer? ⇒ Boolean
The user subscribed Hatena Bookmark Plus or not.
-
#private? ⇒ Boolean
The user does not share his/her bookmarks with anyone or not.
Methods included from ResponseObject
#==, #[], included, #initialize, #to_hash
Instance Attribute Details
#name ⇒ String (readonly)
User’s Hatena ID
15 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 15 STRING_PROPERTIES = [:name] |
Instance Method Details
#oauth_evernote? ⇒ Boolean
Connected with Evernote using OAuth or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |
#oauth_facebook? ⇒ Boolean
Connected with Facebook using OAuth or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |
#oauth_mixi_check? ⇒ Boolean
Connected with mixi check using OAuth or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |
#oauth_twitter? ⇒ Boolean
Connected with Twitter using OAuth or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |
#plususer? ⇒ Boolean
The user subscribed Hatena Bookmark Plus or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |
#private? ⇒ Boolean
The user does not share his/her bookmarks with anyone or not
39 40 41 42 43 |
# File 'lib/hatena/bookmark/restful/v1/user.rb', line 39 BOOLEAN_PROPERTIES.each do |prop| define_method(prop.to_s.gsub(/^is_/, '')) do @attributes.fetch(prop) end end |