BKVideo
public enum BKVideo
extension BKVideo: CustomStringConvertible
extension BKVideo: Equatable
Bilibili video, identified by unique bv string (bvid) or [deprecated] av number (aid).
-
[Deprecated] Video identified by av number (aid).
Warning
consider using bvid instead: 【升级公告】AV号全面升级至BV号.Declaration
Swift
case av(Int)
-
Video identified by bv string (bvid).
Declaration
Swift
case bv(String)
-
视频相关信息
See moreDeclaration
Swift
public struct Info : Codable
-
Dimension of the video
See moreDeclaration
Swift
public struct Dimension : Codable
-
Sub page of video, identified by unique cid.
See moreDeclaration
Swift
public struct Page : Codable, Equatable
-
Fetch all pages of video and perform action over.
Declaration
Swift
public func pages(handler: @escaping BKHandler<[Page]>)
Parameters
handler
code to perform on the pages.
-
Fetch the first page of video and perform action over.
Declaration
Swift
public func p1(handler: @escaping BKHandler<Page>)
Parameters
handler
code to perform on the page.
-
Fetch page of video at index and perform action over.
Declaration
Swift
public func page(_ index: Int, handler: @escaping BKHandler<Page>)
Parameters
index
ONE based index of the page to fetch.
handler
code to perform on the page.
-
Fetch page of video at index and perform action over.
Declaration
Swift
public subscript(index: Int, handler: @escaping BKHandler<Page>) -> Void { get }
Parameters
index
ZERO based index of the page to fetch.
handler
code to perform on the page.
-
Undocumented
See moreDeclaration
Swift
public class _BaseStat : Codable
-
Undocumented
Declaration
Swift
public func getStat(then handler: @escaping BKHandler<ArchiveStat>)
-
In case if local conversion fails, this fetches the real IDs.
Declaration
Swift
public func getIDs(then handler: @escaping BKHandler<(aid: Int, bvid: String)>)
Parameters
handler
process real aid and bvid
-
Useful to pass as URL parameter.
Declaration
Swift
public var description: String { get }
-
The associated av number of this video.
Note
it’s highly likely that an overflow will happen eventually. In that case, we crash.Declaration
Swift
public var aid: Int { get }
-
The associated bv string of this video.
Note
it’s highly likely that an overflow will happen eventually. In that case, we crash.Declaration
Swift
public var bvid: String { get }
-
Converts the given bv ID string to its corresponding av number.
Note
it’s highly likely that an overflow will happen eventually. In that case, we crash.Declaration
Swift
public static func aid(fromBV bvid: String) -> Int
Parameters
bvid
the bv ID string to convert from.
-
Converts the given av number to its corresponding bv ID string.
Note
it’s highly likely that an overflow will happen eventually. In that case, we crash.Declaration
Swift
public static func bvid(fromAV aid: Int) -> String
Parameters
aid
the av number to convert from.
-
Returns a Boolean value indicating whether two values are equal. Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.
Declaration
Swift
public static func == (lhs: BKVideo, rhs: BKVideo) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.