فهرست منبع

Update README about attributes

kishikawa katsumi 9 سال پیش
والد
کامیت
1bb3482e4c
1فایلهای تغییر یافته به همراه42 افزوده شده و 1 حذف شده
  1. 42 1
      README.md

+ 42 - 1
README.md

@@ -160,7 +160,7 @@ do {
 }
 }
 ```
 ```
 
 
-### :key: Label and Comment
+### :key: Set Label and Comment
 
 
 ```swift
 ```swift
 let keychain = Keychain(server: "https://github.com", protocolType: .HTTPS)
 let keychain = Keychain(server: "https://github.com", protocolType: .HTTPS)
@@ -174,6 +174,47 @@ do {
 }
 }
 ```
 ```
 
 
+### :key: Obtaining Other Attributes
+
+#### PersistentRef
+
+```swift
+let keychain = Keychain()
+do {
+    let persistentRef = try keychain.get("kishikawakatsumi") { $0?.persistentRef }
+    ...
+} catch let error {
+    print("error: \(error)")
+}
+```
+
+#### Creation Date
+
+```swift
+let keychain = Keychain()
+do {
+    let creationDate = try keychain.get("kishikawakatsumi") { $0?.creationDate }
+    ...
+} catch let error {
+    print("error: \(error)")
+}
+```
+
+#### All Attributes
+
+```swift
+let keychain = Keychain()
+do {
+    let attributes = try keychain.get("kishikawakatsumi") { $0 }
+    print(attributes.comment)
+    print(attributes.label)
+    print(attributes.creator)
+    ...
+} catch let error {
+    print("error: \(error)")
+}
+```
+
 ### :key: Configuration (Accessibility, Sharing, iCould Sync)
 ### :key: Configuration (Accessibility, Sharing, iCould Sync)
 
 
 **Provides fluent interfaces**
 **Provides fluent interfaces**