satoshi-takano / OpenGraph

A Swift wrapper for the Open Graph protocol (OGP).
190 stars 59 forks source link

Support async await #50

Closed p-x9 closed 2 years ago

p-x9 commented 3 years ago

Support async/await

Sample

print("start")

let url = URL(string: "https://github.com/p-x9/OpenGraph")!
Task {
    let og = try! await OpenGraph.fetch(url: url)
    dump(og)
 }
print("end")

Result

start
end

▿ OpenGraph.OpenGraph
  ▿ source: 8 key/value pairs
...
satoshi-takano commented 2 years ago

@p-x9 Thanks for your Pull Request. I'll review it after official release of Xcode 13.2.

satoshi-takano commented 2 years ago

@p-x9 Thanks a lot for your contribution.