OpenGraphWorker

public final class OpenGraphWorker

An open graph worker. Requests a given URL to scrape the Open Graph data.

  • A Open Graph data completion block.

    Declaration

    Swift

    public typealias Completion = (_ url: URL, _ response: OGResponse?, _ error: Error?) -> Void
  • Create a Open Graph worker with a given completion block.

    Declaration

    Swift

    public init(callbackQueue: DispatchQueue = .main, completion: @escaping Completion)
  • Dispatch a given URL.

    Declaration

    Swift

    public func dispatch(_ url: URL, delay: DispatchTimeInterval = .seconds(1))
  • Cancel the work.

    Declaration

    Swift

    public func cancel()
  • Checks cache with bad URL’s, which returned an error on request.

    Declaration

    Swift

    public func isBadURL(_ url: URL) -> Bool