Class: Vk::API::Newsfeed::Methods::Get

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/newsfeed/methods/get.rb

Overview

Returns data required to show newsfeed for the current user.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Newsfeed::Methods::Get

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :filters (Array)

    Filters to apply:; 'post' — new wall posts; 'photo' — new photos; 'photo_tag' — new photo tags; 'wall_photo' — new wall photos; 'friend' — new friends; 'note' — new notes

  • :return_banned (Boolean)

    '1' — to return news items from banned sources

  • :start_time (Integer)

    Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.

  • :end_time (Integer)

    Latest timestamp (in Unix time) of a news item to return. By default, the current time.

  • :max_photos (Integer)

    Maximum number of photos to return. By default, '5'.

  • :source_ids (String)

    Sources to obtain news from, separated by commas.; ; User IDs can be specified in formats '' or 'u' ; where '' is the user's friend ID.; ; Community IDs can be specified in formats '-' or 'g' ; where '' is the community ID.; ; If the parameter is not set, all of the user's friends and communities are returned, except for banned sources, which can be obtained with the method.;

  • :start_from (String)

    identifier required to get the next page of results. ; Value for this parameter is returned in 'next_from' field in a reply.

  • :count (Integer)

    Number of news items to return (default 50; maximum 100). For auto feed, you can use the 'new_offset' parameter returned by this method.

  • :fields (Array)

    Additional fields of and to return.



# File 'lib/vk/api/newsfeed/methods/get.rb', line 15

Instance Method Details

#countInteger

Returns Number of news items to return (default 50; maximum 100). For auto feed, you can use the 'new_offset' parameter returned by this method.

Returns:

  • (Integer)

    Number of news items to return (default 50; maximum 100). For auto feed, you can use the 'new_offset' parameter returned by this method.



45
# File 'lib/vk/api/newsfeed/methods/get.rb', line 45

attribute :count, API::Types::Coercible::Int.optional.default(nil)

#end_timeInteger

Returns Latest timestamp (in Unix time) of a news item to return. By default, the current time.

Returns:

  • (Integer)

    Latest timestamp (in Unix time) of a news item to return. By default, the current time.



37
# File 'lib/vk/api/newsfeed/methods/get.rb', line 37

attribute :end_time, API::Types::Coercible::Int.optional.default(nil)

#fieldsArray

Returns Additional fields of and to return.

Returns:

  • (Array)

    Additional fields of and to return.



47
# File 'lib/vk/api/newsfeed/methods/get.rb', line 47

attribute :fields, API::Types::Coercible::Array.member(API::Types::Coercible::String).optional.default(nil)

#filtersArray

Returns Filters to apply:; 'post' — new wall posts; 'photo' — new photos; 'photo_tag' — new photo tags; 'wall_photo' — new wall photos; 'friend' — new friends; 'note' — new notes.

Returns:

  • (Array)

    Filters to apply:; 'post' — new wall posts; 'photo' — new photos; 'photo_tag' — new photo tags; 'wall_photo' — new wall photos; 'friend' — new friends; 'note' — new notes



31
# File 'lib/vk/api/newsfeed/methods/get.rb', line 31

attribute :filters, API::Types::Coercible::Array.member(API::Types::Coercible::String).optional.default(nil)

#max_photosInteger

Returns Maximum number of photos to return. By default, '5'.

Returns:

  • (Integer)

    Maximum number of photos to return. By default, '5'.



39
# File 'lib/vk/api/newsfeed/methods/get.rb', line 39

attribute :max_photos, API::Types::Coercible::Int.optional.default(nil)

#return_bannedBoolean

Returns '1' — to return news items from banned sources.

Returns:

  • (Boolean)

    '1' — to return news items from banned sources



33
# File 'lib/vk/api/newsfeed/methods/get.rb', line 33

attribute :return_banned, API::Types::Form::Bool.optional.default(nil)

#source_idsString

Returns Sources to obtain news from, separated by commas.; ; User IDs can be specified in formats '' or 'u' ; where '' is the user's friend ID.; ; Community IDs can be specified in formats '-' or 'g' ; where '' is the community ID.; ; If the parameter is not set, all of the user's friends and communities are returned, except for banned sources, which can be obtained with the method.;.

Returns:

  • (String)

    Sources to obtain news from, separated by commas.; ; User IDs can be specified in formats '' or 'u' ; where '' is the user's friend ID.; ; Community IDs can be specified in formats '-' or 'g' ; where '' is the community ID.; ; If the parameter is not set, all of the user's friends and communities are returned, except for banned sources, which can be obtained with the method.;



41
# File 'lib/vk/api/newsfeed/methods/get.rb', line 41

attribute :source_ids, API::Types::Coercible::String.optional.default(nil)

#start_fromString

Returns identifier required to get the next page of results. ; Value for this parameter is returned in 'next_from' field in a reply.

Returns:

  • (String)

    identifier required to get the next page of results. ; Value for this parameter is returned in 'next_from' field in a reply.



43
# File 'lib/vk/api/newsfeed/methods/get.rb', line 43

attribute :start_from, API::Types::Coercible::String.optional.default(nil)

#start_timeInteger

Returns Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.

Returns:

  • (Integer)

    Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.



35
# File 'lib/vk/api/newsfeed/methods/get.rb', line 35

attribute :start_time, API::Types::Coercible::Int.optional.default(nil)