Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
YuigaWada committed Dec 1, 2019
1 parent 24ba186 commit 29ade38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ Additionally, You can choose whether to use callback pattern or delegation patte

```swift
MisskeyKit.auth.appSecret = "Enter your Secret Key"
MisskeyKit.auth.viewController.resultApiKey() { apiKey in

let authVC = MisskeyKit.auth.viewController
authVC.resultApiKey() { apiKey in

guard let apiKey = apiKey else { return }
print(apiKey) // u can get uesr's apikey.

}

self.present(MisskeyKit.auth.viewController, animated: true)
self.present(authVC, animated: true)
```


Expand All @@ -164,9 +166,11 @@ class ViewController: UIViewController, AuthViewControllerDelegate {

func something() {
MisskeyKit.auth.appSecret = "Enter your Secret Key"
MisskeyKit.auth.viewController.delegate = self

self.present(MisskeyKit.auth.viewController, animated: true)
let authVC = MisskeyKit.auth.viewController
authVC.delegate = self

self.present(authVC, animated: true)
}

//....
Expand Down
12 changes: 8 additions & 4 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,16 @@ Misskeyのユーザー認証には本来、5つのステップが存在します

```swift
MisskeyKit.auth.appSecret = "Enter your Secret Key"
MisskeyKit.auth.viewController.resultApiKey() { apiKey in

let authVC = MisskeyKit.auth.viewController
authVC.resultApiKey() { apiKey in

guard let apiKey = apiKey else { return }
print(apiKey) // apiキーが取得できているのを確認できます

}

self.present(MisskeyKit.auth.viewController, animated: true)
self.present(authVC, animated: true)
```


Expand All @@ -166,9 +168,11 @@ class ViewController: UIViewController, AuthViewControllerDelegate {

func something() {
MisskeyKit.auth.appSecret = "Enter your Secret Key"
MisskeyKit.auth.viewController.delegate = self

self.present(MisskeyKit.auth.viewController, animated: true)
let authVC = MisskeyKit.auth.viewController
authVC.delegate = self

self.present(authVC, animated: true)
}

//....
Expand Down

0 comments on commit 29ade38

Please sign in to comment.