Comments (6)
in case somebody wants to fix it for themself:
- go to https://emoji-api.com and obtain an API key
- locate the location of the nodeJS script (in alfred -> workflows -> right click on Emoj -> open in finder)
- update index.js so that it looks like this
'use strict';
const alfy = require('alfy');
(async () => {
const data = await alfy.fetch(`https://emoji-api.com/emojis?search=${alfy.input}&access_key=YOUR_API_KEY`);
let all = '';
const items = data.map(item => {
const emoji = item.character;
all += emoji;
return {
title: emoji,
arg: emoji,
icon: {
path: ' ' // Hide icon
}
};
});
items.push({
title: all,
arg: all,
icon: {
path: ' '
}
});
alfy.output(items);
})();
- replace YOUR_API_KEY with your API key from step 1.
hope that helps :)
from alfred-emoj.
I've reached out to the company who runs the API (since I maintained the kaomoji version). This is their statement:
Unfortunately our company is winding down, the emoji and kaomoji api are shutting down. The keyboard Minuum will be spun out but the API are reaching end of life.
from alfred-emoj.
Yeah still broken indeed :( #26 mentioned it too but it has been a few days now already, does not seem to be a short downtime period, maybe they shut it down for good? In that case we might have to search for a new API, e.g. https://emoji-api.com/ or others
from alfred-emoj.
This project should be changed to depend on https://github.com/sindresorhus/emoj, which does have an alternative emoji source now.
from alfred-emoj.
in case somebody wants to fix it for themself:
- go to https://emoji-api.com and obtain an API key
- locate the location of the nodeJS script (in alfred -> workflows -> right click on Emoj -> open in finder)
- update index.js so that it looks like this
'use strict'; const alfy = require('alfy'); (async () => { const data = await alfy.fetch(`https://emoji-api.com/emojis?search=${alfy.input}&access_key=YOUR_API_KEY`); let all = ''; const items = data.map(item => { const emoji = item.character; all += emoji; return { title: emoji, arg: emoji, icon: { path: ' ' // Hide icon } }; }); items.push({ title: all, arg: all, icon: { path: ' ' } }); alfy.output(items); })();
- replace YOUR_API_KEY with your API key from step 1.
hope that helps :)
@Bergrebell thanks for your fix, it works great! But I found that sometimes the data
is empty funny
and I don't get any answer... because of that maybe is better to check if data is there?
'use strict';
const alfy = require('alfy');
(async () => {
const data = await alfy.fetch(`https://emoji-api.com/emojis?search=${alfy.input}&access_key=YOUR_API_KEY`);
let all = '';
if (data) {
const items = data.map(item => {
const emoji = item.character;
all += emoji;
return {
title: emoji,
arg: emoji,
icon: {
path: ' ' // Hide icon
}
};
});
items.push({
title: all,
arg: all,
icon: {
path: ' '
}
});
alfy.output(items);
}
})();
from alfred-emoj.
@sindresorhus Could this be updated to support a new Emoji API?
from alfred-emoj.
Related Issues (20)
- Slow Results HOT 12
- Certificate Expired 😢 HOT 2
- question: update emoji dictionary HOT 1
- HTTPError (Api-limit reached?) HOT 7
- No Results HOT 1
- no workflow was created after installation HOT 2
- Error - certificate has expired HOT 1
- A .alfredworkflow download within the releases HOT 1
- TypeError when there are no results HOT 13
- Workflow isn't listed in Alfred after install HOT 1
- npm i -g alfred-emoj failed with Alfred 4 HOT 2
- Still Unable to Read Preferences in Alfred 4 HOT 1
- Error: Cannot find module '.' HOT 1
- Support offline
- Cannot find emoji: ''RequestError: getaddrinfo ENOTFOUND emoji.getdango.com" HOT 3
- Evaluation version of API causing JSON parse error HOT 1
- Is it possible to add support to a theme I use to highlight the results better? HOT 1
- Error installing on OSX HOT 16
- TypeError: binary is not a function HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-emoj.