Giter Club home page Giter Club logo

Comments (19)

Huang-Libo avatar Huang-Libo commented on May 28, 2024 4

You can have a look at this repo, its trending api is closed to https://github.com/trending, it maybe have some time lag because of cache, but still awesome.
By the way, this API is used by CodeHub APP now.

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024 2

I have created a first draft of the approach.
You can read it here. https://github.com/RolfKoenders/gitpoint-api-docs

I'm going to investigate which data we can retrieve by scraping. Since we then have the repository name we could use the API to retrieve more details about that repository and save that in the data store. After we know which data will be stored we can start working on the API calls.

from git-point.

housseindjirdeh avatar housseindjirdeh commented on May 28, 2024 1

Thank you so much @Huang-Libo that is perfect!!! Makes things so much simpler πŸŽ‰ πŸŽ‰ πŸŽ‰

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024 1

@housseindjirdeh You need the auto complete usernames features ;)
I will document a plan and share it to discuss!

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024 1

I have the API ready you can use that! :D I was working on implementing it but takes me longer then expected to do it properly with the redux system, and i have a busy period.. If you need help let me know.

Until we are going to re-deploy it to the correct account @housseindjirdeh you can use this url:
http://gp-public-160495907.eu-west-1.elb.amazonaws.com/trending/today

Docs: https://github.com/RolfKoenders/gitpoint-api-docs/blob/master/api/swagger.yml

from git-point.

astelvida avatar astelvida commented on May 28, 2024

I've tried adding that feature to one of my projects - but GitHub doesn't provide an api specifically for getting the exact data at that url. The solution closest to that is to use the Search API and give it some options. For instance for finding popular API's created in the last day using js:

curl -G https://api.github.com/search/repositories --data-urlencode "sort=stars" --data-urlencode "order=desc" --data-urlencode "q=language:javascript" --data-urlencode "q=created:>date -v-1d '+%Y-%m-%d'"

But clearly, that doesn't give the same results as https://github.com/trending/javascript

If anyone found a better/actual way of getting trending repos, please share. :)

from git-point.

housseindjirdeh avatar housseindjirdeh commented on May 28, 2024

I really wanted to include this as part of the first release but just like you mentioned @astelvida - there was no direct available endpoint for it :O

Will love to hear any suggestions from anybody on how we can do this. If there is no better solution, I'm okay with using the queried search API just like you mentioned and calling it 'Popular Repositories this past day/week/etc'

from git-point.

housseindjirdeh avatar housseindjirdeh commented on May 28, 2024

In terms of design - I think this can fit perfectly within the Search screen. Right now we have a placeholder when a search hasn't been made (Search for any repository/user). I think having the list of popular/trending repositories here would awesome.

We can start with just having popular repositories of today and I would be happy to close this PR with it. We can create a separate ticket to add a toggle of sorts for today/this week/this month if we prefer πŸ•Ί

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024

@Huang-Libo That api would definitely work for us!
@housseindjirdeh What would be a nice place to show this? Add an star to the tabbar and show a nice view of the trending repo's? There is not really a 'other' menu option. We could maybe replace the profile with a hamburger icon and show a list of other options?

from git-point.

andrewda avatar andrewda commented on May 28, 2024

It might fit well somewhere on the search screen, too.

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024

@andrewda Yea i was thinking that to. As a option next to Repositories & Users? But are we then searching in trending when the user clicks search?

from git-point.

andrewda avatar andrewda commented on May 28, 2024

Yea, I was thinking that would be a good spot. How about on that tab instead of a search bar we have a drop down with languages?

note to self: you can use a language parameter on the codehub trending API http://trending.codehub-app.com/v2/trending?language=python

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024

@andrewda That sounds like a nice feature!

from git-point.

housseindjirdeh avatar housseindjirdeh commented on May 28, 2024

@andrewda @RolfKoenders yep on the search screen was exactly what I was thinking, but I don't think it should be a tab besides repos and users specifically because it'll seem like users have to search for trending. I was thinking showing a list of trending repositories (and a title) as a placeholder on that screen before the user searches for anything (instead of the message Search for any repository/user. Does that make sense?

However I do think having a dropdown is a good idea πŸ€” I really like @andrewda's idea but as a user it's an extra step to find trending so I'm leaning towards showing it as a default. Repositories tab will default to showing trending repositories of today and Users tab will default to trending users of today. We can later add support of a dropdown to change timelines. How does that sound?

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024

@housseindjirdeh Showing the trending repositories before searching sounds like a nice idea indeed.
Btw, if i am correct the owner of that api stated in the readme to not use those endpoints since its for their app. We could host/setup our own instance of it, or i could build a similar api maybe with some more options/filters we would like. So we can make the api to our needs.

from git-point.

housseindjirdeh avatar housseindjirdeh commented on May 28, 2024

@RolfKoenders thank you for noticing that, I didn't catch that in the README! We definitely can't use those endpoints since that's the case - I would absolutely love if we can set up a similar instance or even one with more options, filters. I hope this won't be too much work however so let's use this and our Gitter channel to chat all the details.

from git-point.

RolfKoenders avatar RolfKoenders commented on May 28, 2024

I assigned this issue to myself. Follow up message on the message above this one. Im starting on the actual API at this moment, the next phase is the deployment part and then the actual screens in the app. Follow the progress here

from git-point.

lex111 avatar lex111 commented on May 28, 2024

@RolfKoenders I will take it?

from git-point.

lex111 avatar lex111 commented on May 28, 2024

@RolfKoenders Thanks, it's cool, I'll see what can be done.

from git-point.

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.