Class: Vk::API::Notes

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/notes/note.rb,
lib/vk/api/notes/methods/add.rb,
lib/vk/api/notes/methods/get.rb,
lib/vk/api/notes/methods/edit.rb,
lib/vk/api/notes/note_comment.rb,
lib/vk/api/notes/methods/delete.rb,
lib/vk/api/notes/methods/get_by_id.rb,
lib/vk/api/notes/methods/edit_comment.rb,
lib/vk/api/notes/methods/get_comments.rb,
lib/vk/api/notes/methods/create_comment.rb,
lib/vk/api/notes/methods/delete_comment.rb,
lib/vk/api/notes/responses/add_response.rb,
lib/vk/api/notes/responses/get_response.rb,
lib/vk/api/notes/methods/restore_comment.rb,
lib/vk/api/notes/responses/edit_response.rb,
lib/vk/api/notes/responses/delete_response.rb,
lib/vk/api/notes/responses/get_by_id_response.rb,
lib/vk/api/notes/responses/edit_comment_response.rb,
lib/vk/api/notes/responses/get_comments_response.rb,
lib/vk/api/notes/responses/create_comment_response.rb,
lib/vk/api/notes/responses/delete_comment_response.rb,
lib/vk/api/notes/responses/restore_comment_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: Note, NoteComment

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

#add(arguments = {}) ⇒ Vk::API::Notes::Responses::AddResponse

Returns Creates a new note for the current user.

Parameters:

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

Options Hash (arguments):

Returns:

See Also:



3589
3590
3591
3592
3593
3594
3595
# File 'lib/vk/api/methods.rb', line 3589

def add(arguments = {})
  require "vk/api/notes/methods/add"
  method = Methods::Add.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/add_response"
  Responses::AddResponse.new(response.deep_symbolize_keys)
end

#create_comment(arguments = {}) ⇒ Vk::API::Notes::Responses::CreateCommentResponse

Returns Adds a new comment on a note.

Parameters:

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

Options Hash (arguments):

  • :note_id (Integer)

    Note ID.

  • :owner_id (Integer)

    Note owner ID.

  • :reply_to (Integer)

    ID of the user to whom the reply is addressed (if the comment is a reply to another comment).;

  • :message (String)

    Comment text.

  • :guid (String)

Returns:

See Also:



3643
3644
3645
3646
3647
3648
3649
# File 'lib/vk/api/methods.rb', line 3643

def create_comment(arguments = {})
  require "vk/api/notes/methods/create_comment"
  method = Methods::CreateComment.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/create_comment_response"
  Responses::CreateCommentResponse.new(response.deep_symbolize_keys)
end

#delete(arguments = {}) ⇒ Vk::API::Notes::Responses::DeleteResponse

Returns Deletes a note of the current user.

Parameters:

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

Options Hash (arguments):

  • :note_id (Integer)

    Note ID.

Returns:

See Also:



3615
3616
3617
3618
3619
3620
3621
# File 'lib/vk/api/methods.rb', line 3615

def delete(arguments = {})
  require "vk/api/notes/methods/delete"
  method = Methods::Delete.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/delete_response"
  Responses::DeleteResponse.new(response.deep_symbolize_keys)
end

#delete_comment(arguments = {}) ⇒ Vk::API::Notes::Responses::DeleteCommentResponse

Returns Deletes a comment on a note.

Parameters:

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

Options Hash (arguments):

  • :comment_id (Integer)

    Comment ID.

  • :owner_id (Integer)

    Note owner ID.

Returns:

See Also:



3668
3669
3670
3671
3672
3673
3674
# File 'lib/vk/api/methods.rb', line 3668

def delete_comment(arguments = {})
  require "vk/api/notes/methods/delete_comment"
  method = Methods::DeleteComment.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/delete_comment_response"
  Responses::DeleteCommentResponse.new(response.deep_symbolize_keys)
end

#edit(arguments = {}) ⇒ Vk::API::Notes::Responses::EditResponse

Returns Edits a note of the current user.

Parameters:

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

Options Hash (arguments):

Returns:

See Also:



3604
3605
3606
3607
3608
3609
3610
# File 'lib/vk/api/methods.rb', line 3604

def edit(arguments = {})
  require "vk/api/notes/methods/edit"
  method = Methods::Edit.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/edit_response"
  Responses::EditResponse.new(response.deep_symbolize_keys)
end

#edit_comment(arguments = {}) ⇒ Vk::API::Notes::Responses::EditCommentResponse

Returns Edits a comment on a note.

Parameters:

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

Options Hash (arguments):

  • :comment_id (Integer)

    Comment ID.

  • :owner_id (Integer)

    Note owner ID.

  • :message (String)

    New comment text.

Returns:

See Also:



3656
3657
3658
3659
3660
3661
3662
# File 'lib/vk/api/methods.rb', line 3656

def edit_comment(arguments = {})
  require "vk/api/notes/methods/edit_comment"
  method = Methods::EditComment.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/edit_comment_response"
  Responses::EditCommentResponse.new(response.deep_symbolize_keys)
end

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

Returns a list of notes created by a user.

Parameters:

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

Options Hash (arguments):

  • :note_ids (Array)

    Note IDs.

  • :user_id (Integer)

    Note owner ID.

  • :count (Integer) — default: 20

    Number of notes to return.

Returns:

See Also:



3563
3564
3565
3566
3567
3568
3569
# File 'lib/vk/api/methods.rb', line 3563

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

#get_by_id(arguments = {}) ⇒ Vk::API::Notes::Responses::GetByIdResponse

Returns a note by its ID.

Parameters:

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

Options Hash (arguments):

  • :note_id (Integer)

    Note ID.

  • :owner_id (Integer)

    Note owner ID.

Returns:

See Also:



3575
3576
3577
3578
3579
3580
3581
# File 'lib/vk/api/methods.rb', line 3575

def get_by_id(arguments = {})
  require "vk/api/notes/methods/get_by_id"
  method = Methods::GetById.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/get_by_id_response"
  Responses::GetByIdResponse.new(response.deep_symbolize_keys)
end

#get_comments(arguments = {}) ⇒ Vk::API::Notes::Responses::GetCommentsResponse

Returns a list of comments on a note.

Parameters:

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

Options Hash (arguments):

  • :note_id (Integer)

    Note ID.

  • :owner_id (Integer)

    Note owner ID.

  • :count (Integer) — default: 20

    Number of comments to return.

Returns:

See Also:



3628
3629
3630
3631
3632
3633
3634
# File 'lib/vk/api/methods.rb', line 3628

def get_comments(arguments = {})
  require "vk/api/notes/methods/get_comments"
  method = Methods::GetComments.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/get_comments_response"
  Responses::GetCommentsResponse.new(response.deep_symbolize_keys)
end

#restore_comment(arguments = {}) ⇒ Vk::API::Notes::Responses::RestoreCommentResponse

Returns Restores a deleted comment on a note.

Parameters:

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

Options Hash (arguments):

  • :comment_id (Integer)

    Comment ID.

  • :owner_id (Integer)

    Note owner ID.

Returns:

See Also:



3680
3681
3682
3683
3684
3685
3686
# File 'lib/vk/api/methods.rb', line 3680

def restore_comment(arguments = {})
  require "vk/api/notes/methods/restore_comment"
  method = Methods::RestoreComment.new(arguments)
  response = method.call(@client)
  require "vk/api/notes/responses/restore_comment_response"
  Responses::RestoreCommentResponse.new(response.deep_symbolize_keys)
end