Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imryan/brocade
📦 Swift library for the free and open product database.
https://github.com/imryan/brocade
brocade database datakick gtin product product-database upc
Last synced: about 1 month ago
JSON representation
📦 Swift library for the free and open product database.
- Host: GitHub
- URL: https://github.com/imryan/brocade
- Owner: imryan
- License: mit
- Created: 2020-04-25T17:59:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T21:31:56.000Z (over 4 years ago)
- Last Synced: 2024-11-18T03:29:23.504Z (about 1 month ago)
- Topics: brocade, database, datakick, gtin, product, product-database, upc
- Language: Swift
- Homepage: https://www.brocade.io/
- Size: 664 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📦 Brocade
Swift library for the free and open product database.[![CI Status](https://img.shields.io/travis/imryan/Brocade.svg?style=flat)](https://travis-ci.org/imryan/Brocade)
[![Version](https://img.shields.io/cocoapods/v/Brocade.svg?style=flat)](https://cocoapods.org/pods/Brocade)
[![License](https://img.shields.io/cocoapods/l/Brocade.svg?style=flat)](https://cocoapods.org/pods/Brocade)
[![Platform](https://img.shields.io/cocoapods/p/Brocade.svg?style=flat)](https://cocoapods.org/pods/Brocade)## Usage
```swift
// List last 100 items using delegate
let brocade = Brocade(delegate: self)
brocade.listItems()// List last 100 items using closure
brocade.listItems { (items, error) in
debugPrint("Items: \(items). Error: \(error?.localizedDescription).")
}// Get item by code using delegate
let brocade = Brocade(delegate: self)
brocade.getItem(code: "00074887615305")// Get item by code using closure
brocade.getItem(code: "00074887615305") { (item, error) in
debugPrint("Item: \(item.itemSummary). Error: \(error?.localizedDescription).")
}// Search item by query using delegate
let brocade = Brocade(delegate: self)
brocade.searchItem(query: "milk")// Search item by query using closure
brocade.searchItem(query: "milk") { (items, error) in
debugPrint("Items: \(items). Error: \(error?.localizedDescription).")
}
```## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
![](Screenshots/list.png)
![](Screenshots/search.png)
## InstallationBrocade is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'Brocade'
```## Author
Ryan Cohen, [email protected]
## License
Brocade is available under the MIT license. See the LICENSE file for more info.