Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximbilan/swiftoxfordapi
A framework to use Oxford Dictionaries API written in Swift
https://github.com/maximbilan/swiftoxfordapi
definition oxford oxford-dictionary swift translate
Last synced: about 1 month ago
JSON representation
A framework to use Oxford Dictionaries API written in Swift
- Host: GitHub
- URL: https://github.com/maximbilan/swiftoxfordapi
- Owner: maximbilan
- License: mit
- Created: 2018-11-11T11:11:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-17T19:10:28.000Z (about 6 years ago)
- Last Synced: 2024-12-08T07:33:06.110Z (about 2 months ago)
- Topics: definition, oxford, oxford-dictionary, swift, translate
- Language: Swift
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftOxfordAPI
A framework to consume the Oxford Dictionaries API written in Swift.
🍟🍉🍋🍇🍌## Installation
CocoaPods:
pod 'SwiftOxfordAPI'
Carthage:
github "maximbilan/SwiftOxfordAPI"
Swift Package Manager:
dependencies: [
.package(url: "https://github.com/maximbilan/SwiftOxfordAPI", from: "0.2"))
]
Manual:
Copy SwiftOxfordAPI.swift to your project.## Initialization
First of all you have to generate API ID and APP key.
And then use the following code:
```swift
SwiftOxfordAPI.shared.start(appId: "APP_ID_HERE", appKey: "APP_KEY_HERE")
```## Using
Right now the framework is supported only two requests: `entries` and `translation`.
For example:
```swift
SwiftOxfordAPI.shared.entries(language: "en", word: "queen", region: "us", filters: "grammaticalFeatures=singular,past;lexicalCategory=noun") { [weak self] (data, error) in
self?.handleResponse(data, error)
}
``````swift
SwiftOxfordAPI.shared.translation(sourceLanguage: "en", word: "queen", targetLanguage: "es") { [weak self] (data, error) in
self?.handleResponse(data, error)
}
```## To do:
Unfortunately, I stopped working on this repository because I don't need it for the moment.
It's not difficult to expand the methods, just follow the implemented code. There is a list below of services which were already implemented. So, If you need more, please create a pull request with implemented services, I'll accept it.- [x] Entries
- [x] Translation
- [ ] Sentences
- [ ] Lemmatron
- [ ] Thesaurus
- [ ] LexiStats
- [ ] Search
- [ ] Wordlist
- [ ] Utility## License
SwiftOxfordAPI is available under the MIT license. See the LICENSE file for more info.