kamranahmedse / githunt

Hunt the most starred projects on any date on GitHub
https://kamranahmed.info/githunt
MIT License
2.89k stars 268 forks source link

Enable support for GitHub Emojis #5

Closed tarungarg546 closed 8 years ago

tarungarg546 commented 8 years ago

Hi there,

With this PR, I want to this extension to support GitHub emojis in any github App description and title using JSON provided by GitHub emoji API(does not need credentials). Before

image

After

image

Thanks & Regards, Tarun Garg

tarungarg546 commented 8 years ago

@kamranahmedse Please review.

kamranahmedse commented 8 years ago

Hey @tarungarg546,

Thanks for the PR but I don't think we need that. I do not want any API calls than to just get the repos.

Thanks though.

tarungarg546 commented 8 years ago

I just wanted to integrate github smileys...but fair enough... BTW we could also strore emoji json from github in localstorage and extract from there instead of making api call.

kamranahmedse commented 8 years ago

Yeah, that we can do 👍

tarungarg546 commented 8 years ago

@kamranahmedse I just got a better idea.

We should use cache API which basically store request and response objects as key-value.

First time when user installs our extension we should issue a request to github emoji api and store request and response in cache API and after that before issuing any request to emoji api we could check if we already have response mapping to this request in it or not.

If it has then return from there else go to network.

Cache API is similar to LocalStorage but it is specifically for request/response and hence better suited for us.