Skip to content

Commit

Permalink
Update README about attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kishikawakatsumi committed Oct 31, 2015
1 parent 90d0001 commit 1bb3482
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ do {
}
```

### :key: Label and Comment
### :key: Set Label and Comment

```swift
let keychain = Keychain(server: "https://github.com", protocolType: .HTTPS)
Expand All @@ -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)

**Provides fluent interfaces**
Expand Down

0 comments on commit 1bb3482

Please sign in to comment.