Skip to content

Commit

Permalink
Added methods in resourcer and in main.py file to fetch contributors …
Browse files Browse the repository at this point in the history
…dynamically (#39)
  • Loading branch information
K Hari Aneesh Siddhartha authored Feb 15, 2023
1 parent 72c38e2 commit 6eac721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def category():
@app.route("/contributors", methods=["GET"])
def contributors():
contributors = resourcer.Resource.get_all_contributors()
saadhan__contributors = resourcer.Resource.get_saadhan_contributors()
return render_template(
"contributors.html", contributors=contributors["contributors"]
"contributors.html", contributors=contributors["contributors"]+saadhan__contributors["contributors"]
)


Expand Down
4 changes: 4 additions & 0 deletions resourcer/resourcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ def get_resources_by_level(self, level: str):
def get_all_contributors():
res = requests.get("https://raw.githubusercontent.com/developersIndia/resources/master/.all-contributorsrc").json()
return res

def get_saadhan_contributors():
res = requests.get("https://raw.githubusercontent.com/developersIndia/saadhan/main/.all-contributorsrc").json()
return res

0 comments on commit 6eac721

Please sign in to comment.