Class: SocialPoster::Poster::Vkontakte
- Inherits:
-
Object
- Object
- SocialPoster::Poster::Vkontakte
- Includes:
- Helper
- Defined in:
- lib/social_poster/poster/vkontakte.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Vkontakte
constructor
A new instance of Vkontakte.
- #write(text, title) ⇒ Object
Methods included from Helper
Constructor Details
#initialize(options) ⇒ Vkontakte
Returns a new instance of Vkontakte.
9 10 11 12 |
# File 'lib/social_poster/poster/vkontakte.rb', line 9 def initialize() @options = @app = VK::Application.new(access_token: (config_key :access_token)) end |
Instance Method Details
#write(text, title) ⇒ Object
14 15 16 |
# File 'lib/social_poster/poster/vkontakte.rb', line 14 def write(text, title) @app.wall.post({message: text}.merge(@options)) end |