Class: Vk::API::Apps

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/apps/app.rb,
lib/vk/api/responses.rb,
lib/vk/api/apps/leaderboard.rb,
lib/vk/api/apps/methods/get.rb,
lib/vk/api/apps/methods/get_score.rb,
lib/vk/api/apps/methods/get_catalog.rb,
lib/vk/api/apps/methods/send_request.rb,
lib/vk/api/apps/responses/get_response.rb,
lib/vk/api/apps/methods/get_leaderboard.rb,
lib/vk/api/apps/methods/get_friends_list.rb,
lib/vk/api/apps/methods/delete_app_requests.rb,
lib/vk/api/apps/responses/get_score_response.rb,
lib/vk/api/apps/responses/get_catalog_response.rb,
lib/vk/api/apps/responses/send_request_response.rb,
lib/vk/api/apps/responses/get_leaderboard_response.rb,
lib/vk/api/apps/responses/get_friends_list_response.rb,
lib/vk/api/apps/responses/delete_app_requests_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: App, Leaderboard

Instance Attribute Summary

Attributes inherited from Schema::Namespace

#client

DSL collapse

Methods inherited from Schema::Namespace

#call, #initialize

Constructor Details

This class inherits a constructor from Vk::Schema::Namespace

Instance Method Details

#delete_app_requests(arguments = {}) ⇒ Vk::API::Apps::Responses::DeleteAppRequestsResponse

Returns Deletes all request notifications from the current app.

Parameters:

  • arguments (Hash) (defaults to: {})

Returns:

See Also:


5319
5320
5321
5322
5323
5324
5325
# File 'lib/vk/api/methods.rb', line 5319

def delete_app_requests(arguments = {})
  require "vk/api/apps/methods/delete_app_requests"
  method = Methods::DeleteAppRequests.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/delete_app_requests_response"
  Responses::DeleteAppRequestsResponse.new(response.deep_symbolize_keys)
end

#get(arguments = {}) ⇒ Vk::API::Apps::Responses::GetResponse

Returns applications data.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :app_id (Integer)

    Application ID

  • :app_ids (Array)

    List of application ID

  • :platform (String) — default: "web"

    platform. Possible values:; *'ios' — iOS;; *'android' — Android;; *'winphone' — Windows Phone;; *'web' — приложения на vk.com.; By default: 'web'.

  • :fields (Array, 'bdate')

    Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities'; (only if return_friends - 1)

  • :name_case (String)

    Case for declension of user name and surname:; 'nom' — nominative (default);; 'gen' — genitive;; 'dat' — dative;; 'acc' — accusative;; 'ins' — instrumental;; 'abl' — prepositional.; ; (only if 'return_friends' = '1')

Returns:

See Also:


5293
5294
5295
5296
5297
5298
5299
# File 'lib/vk/api/methods.rb', line 5293

def get(arguments = {})
  require "vk/api/apps/methods/get"
  method = Methods::Get.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/get_response"
  Responses::GetResponse.new(response.deep_symbolize_keys)
end

#get_catalog(arguments = {}) ⇒ Vk::API::Apps::Responses::GetCatalogResponse

Returns a list of applications (apps) available to users in the App Catalog.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:


5278
5279
5280
5281
5282
5283
5284
# File 'lib/vk/api/methods.rb', line 5278

def get_catalog(arguments = {})
  require "vk/api/apps/methods/get_catalog"
  method = Methods::GetCatalog.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/get_catalog_response"
  Responses::GetCatalogResponse.new(response.deep_symbolize_keys)
end

#get_friends_list(arguments = {}) ⇒ Vk::API::Apps::Responses::GetFriendsListResponse

Returns Creates friends list for requests and invites in current app.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :count (Integer) — default: 20

    List size.

  • :type (String) — default: "request"

    List type. Possible values:; * 'invite' — available for invites (don't play the game);; * 'request' — available for request (play the game).; ; By default: 'invite'.

  • :fields (Array)

    Additional profile fields, see .

Returns:

See Also:


5332
5333
5334
5335
5336
5337
5338
# File 'lib/vk/api/methods.rb', line 5332

def get_friends_list(arguments = {})
  require "vk/api/apps/methods/get_friends_list"
  method = Methods::GetFriendsList.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/get_friends_list_response"
  Responses::GetFriendsListResponse.new(response.deep_symbolize_keys)
end

#get_leaderboard(arguments = {}) ⇒ Vk::API::Apps::Responses::GetLeaderboardResponse

Returns players rating in the game.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :type (String)

    Leaderboard type. Possible values:; *'level' — by level;; *'points' — by mission points;; *'score' — by score ().

  • :global (Boolean) — default: true

    Rating type. Possible values:; *'1' — global rating among all players;; *'0' — rating among user friends.

Returns:

See Also:


5344
5345
5346
5347
5348
5349
5350
# File 'lib/vk/api/methods.rb', line 5344

def get_leaderboard(arguments = {})
  require "vk/api/apps/methods/get_leaderboard"
  method = Methods::GetLeaderboard.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/get_leaderboard_response"
  Responses::GetLeaderboardResponse.new(response.deep_symbolize_keys)
end

#get_score(arguments = {}) ⇒ Vk::API::Apps::Responses::GetScoreResponse

Returns user score in app

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:


5355
5356
5357
5358
5359
5360
5361
# File 'lib/vk/api/methods.rb', line 5355

def get_score(arguments = {})
  require "vk/api/apps/methods/get_score"
  method = Methods::GetScore.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/get_score_response"
  Responses::GetScoreResponse.new(response.deep_symbolize_keys)
end

#send_request(arguments = {}) ⇒ Vk::API::Apps::Responses::SendRequestResponse

Returns Sends a request to another user in an app that uses VK authorization.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:


5309
5310
5311
5312
5313
5314
5315
# File 'lib/vk/api/methods.rb', line 5309

def send_request(arguments = {})
  require "vk/api/apps/methods/send_request"
  method = Methods::SendRequest.new(arguments)
  response = method.call(@client)
  require "vk/api/apps/responses/send_request_response"
  Responses::SendRequestResponse.new(response.deep_symbolize_keys)
end