Giter Club home page Giter Club logo

Comments (5)

adi928 avatar adi928 commented on August 17, 2024

Hey there,

I was able to come up with something for this enhancement. I have made a commit here:
adi928@64e24e1

from giggity.

needmorecowbell avatar needmorecowbell commented on August 17, 2024

Thank you! This is the data we need, but I'd like to add a way to pipe these followers into the hierarchical data structure so it would look something like this. The keys to mention are followers and repos -- I would like to handle followers how repos is handled. Check getRepos() , it's the same thing just for followers. instead of repos.

 "users": {
        "usernameOfOrgMember": {
            "avatar_url": "https://....=4",
            "events_url": "https:/....y}",
            "followers": {
                    "followerOfOrgMember": {" ... "},
                    "followerOfOrgMember2": {".."},
            },
            "followers_url": "https:/....wers",
            "following_url": "https:...._user}",
            "gists_url": "https:/.....st_id}",
            "gravatar_id": "",
            "html_url": "htt...",
            "id": 111,
            "login": "B...n",
            "node_id": "M....Mx",
            "organizations_url": "https://api.gith...rgs",
            "received_events_url": "https://....eived_events",
            "repos": {
                "repo1": {
                    "created_at": "20...4Z",
                    "description": "......c\udfc5",
                    "fork": false,
                    "name": "8...er",
                    "updated_at": "2018-12-04T04:50:09Z",
                    "url": "https...aker"
                },
                "repo2": {
                    "created_at": "20...Z",
                    "description": "Per...tion",
                    "fork": false,
                    "name": "B...o",
                    "updated_at": "2...0Z",
                    "url": "ht...ub.io"
                },
            "repos_url": "https://api.git...epos",
            "site_admin": false,
            "starred_url": "https://api...wner}{/repo}",
            "subscriptions_url": "https://api.github.com...ubscriptions",
            "type": "User",
            "url": "https://api.github.com..."
        },

Eventually it would be nice to add an optional integer parameter to -f, ie: giggity.py -a -f 2 -o github -O github.json to get the followers of followers (3 = followers of followers of followers) of each member in the github organization. That's not necessary right now though, it shouldn't be hard to add once the follower key is added correctly, since it will still use the same getFollowers function, just for each follower however many times.

from giggity.

needmorecowbell avatar needmorecowbell commented on August 17, 2024

Latest commit now has follower flag. I'm going to keep this issue open because depth is still not taken care of, but because it now would be easily possible to handle a depth-focused search using the api I don't see it as such a necessity.

7ecf7d1

from giggity.

adi928 avatar adi928 commented on August 17, 2024

I took the above commit and added depth parameter and used depth in getting levels of followers. But it becomes really slow when people have like 900+ followers. Any workaround for that or we have to go with it?

The commit which has necessary changes: adi928@8a8a374

I can create a PR if everything is fine with the code.

from giggity.

needmorecowbell avatar needmorecowbell commented on August 17, 2024

That looks great, thanks! Yeah if you could make a PR that'd be awesome. The requests could be made concurrently but I'm worried about it getting limited by github's api terms of use. Using two or three threads instead of one might be enough to avoid any abuse of service and still give significant speed boost, but at 900 followers using the depth function, the requests limit is going to get filled up pretty quickly. Really, using the depth function to a degree larger than 3 could lead to some really large results.

Instead, I think maybe it should just be handled by a ratelimited mode, where it pings every 15 mins to see if it can start making requests again after finding out that it's been ratelimited. See issue here: #8

from giggity.

Related Issues (16)

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.