Comments (5)
Hey there,
I was able to come up with something for this enhancement. I have made a commit here:
adi928@64e24e1
from giggity.
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.
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.
from giggity.
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.
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)
- create simple accessor methods for commonly used queries
- Have a write to database feature (sqlite possibly?) HOT 1
- request only gets 30 results at a time HOT 1
- remove unnecessary keys in tree HOT 1
- ratelimit errors aren't handled appropriately
- Publish on pypi
- start a wiki
- generate visualization of network
- Add a license HOT 1
- Add tests HOT 1
- Fix the copyright in your license HOT 1
- Add a setup.py
- Provide example usage output HOT 1
- Depth missing
- god's sake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from giggity.