VKVideos
@objc
public class VKVideos : NSObject
This is a video store class that contains all your repository of videos. Use this class to query and delete videos. Do not make an instance as everything in this class are class properties and class methods
-
Declaration
Swift
public static let shared: VKVideos -
Makes a request for a set of videos to be returned
Declaration
Swift
public func getPlaylist(withTags tags: Set<String>, withMetadata metadata: [String : String], withOrder order: Bool = true, completion: @escaping VKPlaylistRequestBlock)Parameters
tagsThis is a set of string tags to search for. Must not be nil but could be empty
metadataThis is a dictionary of metadatas to search for. Must not be nil but could be empty
orderThis is a bool value indicates the order of sorting videos in playlist. Default - true.
completionThis is the completion block to be called when the playlist is returned. If the call was successful then a
VKVideoPlaylistis returned. Else nil is returned with an error included -
Makes a request for concrete video to be returned.
Declaration
Swift
@discardableResult public func get(byFilter filter: VKVideoFilter, sortOrder: VKSortOrder, completion: @escaping VKVideosRequestBlock) -> VKCancellableParameters
videoIDvideo identifier to be retrieved.
completionThis is the completion block to be called when the video is returned. If the call was successful then a
VVideoObjectis returned. Else nil is returned with an error included -
Makes a request for concrete video to be returned.
Declaration
Swift
@discardableResult public func get(byVideoId id: String, completion: @escaping VKVideoRequestBlock) -> VKCancellableParameters
videoIDvideo identifier to be retrieved.
completionThis is the completion block to be called when the video is returned. If the call was successful then a
VVideoObjectis returned. Else nil is returned with an error included -
Makes a request for multiple videos to be returned.
Declaration
Swift
@discardableResult public func get(byVideoIds ids: [String], completion: @escaping VKVideosRequestBlock) -> VKCancellableParameters
videoIDsvideo ids to be retrieved.
completionThis is the completion block to be called when the video is returned. If the call was successful then a
VVideoObjectis returned. Else nil is returned with an error included -
Video to remove from the store
Declaration
Swift
@discardableResult public func delete(_ video: VKVideo, completion: @escaping (Error?) -> Void) -> VKCancellableParameters
videothe video object that you wish to remove
-
Video to remove from the store
Declaration
Swift
@discardableResult public func delete(videoId id: String, completion: @escaping (Error?) -> Void) -> VKCancellableParameters
idthe video id that you wish to remove
-
Updates a videos title, tags and metadata
Declaration
Swift
@discardableResult public func update(videoId id: String, title: String?, tags: Set<String>?, metadata: [String : String]?, completion: @escaping VKRequestCompletionBlock) -> VKCancellableParameters
idthe video id that you wish to remove
VKVideos Class Reference