Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superstar page should contain gravatar of the members. #36

Open
shahbaz17 opened this issue May 5, 2017 · 4 comments
Open

Superstar page should contain gravatar of the members. #36

shahbaz17 opened this issue May 5, 2017 · 4 comments

Comments

@shahbaz17
Copy link
Collaborator

We can use github's open api for this.
Visit https://developer.github.com/v3/users for more info on how to get it.

GET request to https://api.github.com/users/{username} return public information

GET https://api.github.com/users/gurumukhi returns

{
  "login": "gurumukhi",
  "id": 2748973,
  "avatar_url": "https://avatars2.githubusercontent.com/u/2748973?v=3",
  "gravatar_id": "",
  "url": "https://api.github.com/users/gurumukhi",
  "html_url": "https://github.com/gurumukhi",
  "followers_url": "https://api.github.com/users/gurumukhi/followers",
  "following_url": "https://api.github.com/users/gurumukhi/following{/other_user}",
  "gists_url": "https://api.github.com/users/gurumukhi/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/gurumukhi/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/gurumukhi/subscriptions",
  "organizations_url": "https://api.github.com/users/gurumukhi/orgs",
  "repos_url": "https://api.github.com/users/gurumukhi/repos",
  "events_url": "https://api.github.com/users/gurumukhi/events{/privacy}",
  "received_events_url": "https://api.github.com/users/gurumukhi/received_events",
  "type": "User",
  "site_admin": false,
  "name": "Ram",
  "company": null,
  "blog": "http://gurumukhi.wordpress.com/",
  "location": "Hyderabad, India",
  "email": null,
  "hireable": true,
  "bio": "I'm a web developer at Arcesium India, a Mozilla contributor & a tech speaker. I love to explore and talk about future technologies (diving into WebVR lately).",
  "public_repos": 47,
  "public_gists": 1,
  "followers": 14,
  "following": 6,
  "created_at": "2012-11-08T07:19:26Z",
  "updated_at": "2017-05-02T14:58:16Z"
}

which we can store it on firebase's database(free) so that we need not have to make API call to github everytime user visits website( which is limited ). Also we can store these data on client side using localStorage when they open the website for the first time.

@gurumukhi @lavish205 @Srushtika @akshit13 @tushararora @viswanathamsantosh any suggestions ?

@lavish205
Copy link
Member

lavish205 commented May 5, 2017

instead can't we directly keep images in a gravatar folder?

  • We can easily access and render all the images.
  • no need for extra database
  • no need to make extra API calls
  • and no need to write extra javascript to make api call and store into the database.

@shahbaz17
Copy link
Collaborator Author

dynamic is best than static . And in this process participants will also learn how things work.
And one of the goal of this website is that prepare participants who can work on mozilla's other website as now-a-days everything is built on jekyll ( mostly 😉 ).
And if we talk talk about making API call and databases , so i guess these are the tools one should know if they are web developer.

Open for discussion and suggestion.

@gurumukhi
Copy link
Contributor

Implementing this has all drawbacks mentioned by lavish, this will take time and lot of efforts. I think for now we can go ahead with static approach version 1, but at same time lets keep this open and we will do it in version 2 of the website.

@lavish205
Copy link
Member

zen of python rule no. 3:

Simple is better than complex.

Lets go with simple version for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants