Skip to content

Make fetching of resources dynamic with GitHub APIΒ #17

@Bhupesh-V

Description

@Bhupesh-V

Feature details?

Currently, we manually have to update this map to introduce any new categories

CATEGORIES = {
    "Python": "python",
    "JavaScript": "javascript",
    "C++": "cpp",
    "C":"c",
    "CSS":"css",
    "Data Structures & Algorithms": "dsa",
    "Machine Learning": "machine-learning",
    "Deep Learning": "deep-learning",
    "Computer Science": "computer-science",
    "Computer Graphics": "computer-graphics",
    "Git": "git",
    "Android": "android",
    "Surprise Me!": "miscellaneous",
}

This can be automated by calling the GitHub API to find directories that contain the index.json file.

# get repo file paths
curl -H "Authorization: token YOUR_ACCESS_TOKEN" https://api.github.com/repos/OWNER/REPO/contents

# get paths inside a directory
curl -H "Authorization: token YOUR_ACCESS_TOKEN" https://api.github.com/repos/OWNER/REPO/contents/path/to/directory

The work will involve automatically calling the correct endpoints to dynamically generate resource categories.

Bonus points if you can do this asynchronoisly to reduce the latency!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions