1.0.3 • Published 5 months ago
get-your-github-projects v1.0.3
GetYourGitHubProjects 🚀🚀🚀
Overview 🎯🎯🎯
GetYourGitHubProjects is an NPM package that allows users to automatically fetch project details from their GitHub repositories. This is useful for dynamically updating portfolios without manually adding project information.
Features 🔥🔥🔥
- Fetch project descriptions from all repositories or a specific one.
- Sort repositories by the most recently updated.
- Retrieve additional repository information such as stars, forks, and last updated date.
- Requires a GitHub personal access token for authentication.
Installation 📦📦📦
npm install get-your-github-projects
Usage 🛠️🛠️🛠️
Importing the Package
import GetYourGitHubProjects from "get-your-github-projects";
Fetching Project Data 📊📊📊
Fetch Data from All Repositories
const fetcher = new GetYourGitHubProjects("your-github-username", "file-name");
fetcher.fetchRepositoryFiles().then((projects) => console.log(projects));
Fetch Data from a Specific Repository
const fetcher = new GetYourGitHubProjects(
"your-github-username",
"file-name",
"repo-name"
);
fetcher.fetchRepositoryFiles().then((project) => console.log(project));
API Methods 📖📖📖
Constructor
new GetYourGitHubProjects(username: string, filename: string, token: string, reponame?: string)
- username (required): GitHub username.
- filename (required): The filename to fetch from repositories (e.g.,
description.json
). - reponame (optional): Fetch data from a specific repository.
Methods
fetchRepositoryFiles(): Promise<any[]>
📂📂📂
Fetches the project details either from all repositories or a specific one if
reponame
is provided.
License 📜📜📜
This project is licensed under the MIT License.
Contributing 🤝🤝🤝
Contributions are welcome! Feel free to open an issue or submit a pull request.
Author ✍️✍️✍️
maxAnii