GithubHelp home page GithubHelp logo

maximbilan / swiftoxfordapi Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 39 KB

A framework to use Oxford Dictionaries API written in Swift

License: MIT License

Swift 85.74% Objective-C 6.57% Ruby 7.69%
swift translate definition oxford oxford-dictionary

swiftoxfordapi's Introduction

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:

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:

SwiftOxfordAPI.shared.entries(language: "en", word: "queen", region: "us", filters: "grammaticalFeatures=singular,past;lexicalCategory=noun") { [weak self] (data, error) in
    self?.handleResponse(data, error)
}
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.

  • Entries
  • Translation
  • Sentences
  • Lemmatron
  • Thesaurus
  • LexiStats
  • Search
  • Wordlist
  • Utility

License

SwiftOxfordAPI is available under the MIT license. See the LICENSE file for more info.

swiftoxfordapi's People

Contributors

maximbilan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.