Class: Vkontakte::Api::Secure::Standart

Inherits:
Base
  • Object
show all
Defined in:
lib/vkontakte/api/secure.rb

Instance Attribute Summary

Attributes inherited from Base

#app, #default_params

Instance Method Summary collapse

Methods inherited from Base

#call, #initialize

Constructor Details

This class inherits a constructor from Vkontakte::Api::Base

Instance Method Details

#addRating(options = {}) ⇒ Object

Поднимает пользователю рейтинг от имени приложения.



61
62
63
64
# File 'lib/vkontakte/api/secure.rb', line 61

def addRating(options = {})
  options = default_options.merge(options)
  call("secure.addRating", options)
end

#default_optionsObject



15
16
17
18
19
20
21
# File 'lib/vkontakte/api/secure.rb', line 15

def default_options
  {
    :timestamp => Time.now.utc.to_i,
    :random => Kernel.rand(10000),
    :client_secret => Vkontakte.config.app_secret
  }
end

#getAppBalance(options = {}) ⇒ Object

Возвращает платежный баланс (счет) приложения в сотых долях голоса.



33
34
35
36
# File 'lib/vkontakte/api/secure.rb', line 33

def getAppBalance(options = {})
  options = default_options.merge(options)
  call("secure.getAppBalance", options)
end

#getBalance(options = {}) ⇒ Object

Возвращает баланс пользователя на счету приложения в сотых долях голоса.



40
41
42
43
# File 'lib/vkontakte/api/secure.rb', line 40

def getBalance(options = {})
  options = default_options.merge(options)
  call("secure.getBalance", options)
end

#getTransactionsHistory(options = {}) ⇒ Object

Выводит историю транзакций по переводу голосов между пользователями и приложением.



54
55
56
57
# File 'lib/vkontakte/api/secure.rb', line 54

def getTransactionsHistory(options = {})
  options = default_options.merge(options)
  call("secure.getTransactionsHistory", options)
end

#sendNotification(options = {}) ⇒ Object

Отправляет уведомление пользователю. vk.com/developers.php?oid=-1&p=secure.sendNotification



26
27
28
29
# File 'lib/vkontakte/api/secure.rb', line 26

def sendNotification(options = {})
  options = default_options.merge(options)
  call('secure.sendNotification', options)
end

#setCounter(options = {}) ⇒ Object

Устанавливает счетчик, который выводится пользователю жирным шрифтом в левом меню. Это происходит только в том случае, если пользователь добавил приложение в левое меню со страницы приложения, списка приложений или настроек.



70
71
72
73
# File 'lib/vkontakte/api/secure.rb', line 70

def setCounter(options = {})
  options = default_options.merge(options)
  call("secure.setCounter", options)
end

#withdrawVotes(options = {}) ⇒ Object

Списывает голоса со счета пользователя на счет приложения (в сотых долях).



47
48
49
50
# File 'lib/vkontakte/api/secure.rb', line 47

def withdrawVotes(options = {})
  options = default_options.merge(options)
  call("secure.withdrawVotes", options)
end