- Domain-driven design
- Enough is enough
| 'use strict'; | |
| angular.module('keeniolab', ['ngResource']). | |
| factory('KeenIO',function ($resource) { | |
| var KeenIO = $resource('https://api.keen.io/3.0/projects/513a76812975164a4a000002/queries/:type', | |
| { | |
| api_key: 'api-key', | |
| event_collection: 'read', | |
| timezone: 7200 | |
| }, { | |
| update: { method: 'PUT' } |
| on run {input} | |
| tell application "Evernote" | |
| repeat with SelectedFile in input | |
| try | |
| display dialog "Tags for " & SelectedFile default answer "" | |
| set value to text returned of result | |
| set AppleScript's text item delimiters to "," | |
| set the_tags to text items of value | |
| set the_tags to the_tags & {"file", "paper", "book"} | |