From f43bdc03c35775ea5a2f9ad6a9469e09da4ee912 Mon Sep 17 00:00:00 2001 From: misyobun Date: Sat, 25 Jan 2020 14:26:26 +0900 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5f5e895..d3e2fec 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,29 @@ MetaRod is a lightweight url meta data parser library. ![e5b4c37582a718534d2e83ea48cea18c](https://user-images.githubusercontent.com/509448/72453120-f123cf00-3801-11ea-8947-a1540f91b27e.gif) +## Usage + +``` + MetaRod().build("https://www.vagrantup.jp/entry/2020/01/08/012539").og(completion: { result in + // Do what you want to do with your meta data. + }) { error in + // Error + } +``` +or +``` + DispatchQueue.global().async { + do { + let result = try MetaRod().build("https://www.vagrantup.jp/entry/2020/01/08/012539").og() + DispatchQueue.main.async { + // Do what you want to do with your meta data. + } + } catch { + // Error + } + } +``` + ## Installation ### CocoaPods