https://github.com/basklein/angular-owlbot-wrapper
This is a service for AngularJS that allows for easy requests to the Owlbot dictionary API.
https://github.com/basklein/angular-owlbot-wrapper
Last synced: 2 months ago
JSON representation
This is a service for AngularJS that allows for easy requests to the Owlbot dictionary API.
- Host: GitHub
- URL: https://github.com/basklein/angular-owlbot-wrapper
- Owner: basklein
- License: mit
- Created: 2019-10-09T01:46:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T00:59:22.000Z (over 2 years ago)
- Last Synced: 2025-02-18T03:17:20.186Z (3 months ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/angular-owlbot-wrapper)
[](https://github.com/basklein/angular-owlbot-wrapper/issues)
[](https://github.com/basklein/angular-owlbot-wrapper/blob/master/LICENSE)# angular-owlbot-wrapper
Owlbot service for AngularJS## Description
This is a service for AngularJS that allows for easy requests to the Owlbot dictionary API.## Usage
1. Install via [npm](https://www.npmjs.com/) or downloaded files:
1. via npm: `npm install --save angular-owlbot-wrapper`
2. via [downloaded files](https://github.com/basklein/angular-owlbot-wrapper/master)
2. Add `angular-owlbot-wrapper` to your application's module dependencies.
3. Include dependencies and angular-owlbot-wrapper in your HTML.
- When using npm
```html
```
- When using downloaded files
```html
```
4. Set your Owlbot API token in your config script with the owlbotServiceProvider.setToken function.
5. Use the angular service `owlbotService`.## Sample
Javascript:
```javascript
angular.module('app', ['angular-owlbot-wrapper']);angular.module('angular-owlbot-wrapper').config(['owlbotServiceProvider', function (owlbotServiceProvider) {
owlbotServiceProvider.setToken('TOKENGOESHERE');
}]);angular.module('app')
.controller('appController', function ($scope, owlbotService) {
$scope.getDefinition = function (word) {
return owlbotService.getDefinition(word).then(function (result) {
console.log(result);
return result;
});
};
});
```# LICENSE
MIT