Coder Social home page Coder Social logo

Comments (6)

Bergrebell avatar Bergrebell commented on May 6, 2024 23

in case somebody wants to fix it for themself:

  1. go to https://emoji-api.com and obtain an API key
  2. locate the location of the nodeJS script (in alfred -> workflows -> right click on Emoj -> open in finder)
  3. 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);
})();
  1. replace YOUR_API_KEY with your API key from step 1.

hope that helps :)

from alfred-emoj.

vinkla avatar vinkla commented on May 6, 2024 2

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.

jessedobbelaere avatar jessedobbelaere commented on May 6, 2024 1

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.

sindresorhus avatar sindresorhus commented on May 6, 2024 1

This project should be changed to depend on https://github.com/sindresorhus/emoj, which does have an alternative emoji source now.

from alfred-emoj.

elalemanyo avatar elalemanyo commented on May 6, 2024

in case somebody wants to fix it for themself:

  1. go to https://emoji-api.com and obtain an API key
  2. locate the location of the nodeJS script (in alfred -> workflows -> right click on Emoj -> open in finder)
  3. 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);
})();
  1. 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 🤷‍♂️, for example I test it with 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.

chrisspiegl avatar chrisspiegl commented on May 6, 2024

@sindresorhus Could this be updated to support a new Emoji API?

from alfred-emoj.

Related Issues (20)

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.