https://github.com/liebki/githubnet
This library allows you to retrieve several things from GitHub, things like trending repositories, profiles of users, the repositories of users and related information.
https://github.com/liebki/githubnet
crawler crawling github github-trending htmlagilitypack microsoft
Last synced: 4 months ago
JSON representation
This library allows you to retrieve several things from GitHub, things like trending repositories, profiles of users, the repositories of users and related information.
- Host: GitHub
- URL: https://github.com/liebki/githubnet
- Owner: liebki
- License: gpl-3.0
- Created: 2023-05-13T08:50:32.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-14T01:28:55.000Z (over 1 year ago)
- Last Synced: 2025-01-24T19:47:35.399Z (6 months ago)
- Topics: crawler, crawling, github, github-trending, htmlagilitypack, microsoft
- Language: C#
- Homepage: https://www.nuget.org/packages/GithubDataNet
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GithubNet
## Introduction
Github(Data)Net is a simple C# library, using HtmlAgilityPack to retrieve several things from GitHub, things like trending repositories, profiles of users, the repositories of users and related information.
## Features ⭐
- **Trending Repositories:** Retrieve trending repositories.
- **Repository Details:** Obtain detailed information about repositories.
- **User Profiles:** Access full and light GitHub user profiles.
- **User Repositories:** Retrieve repositories associated with a GitHub user.
- **Topic URL:** Obtain the GitHub URL for a specific topic.## Usage 🔧
### General
The GithubNetClient needs to be used to access all functionalities:
```csharp
GithubNetClient client = new();
```### Trending Repositories
```csharp
IEnumerable GetAllTrendingRepositories(string customQuery = "https://github.com/trending");
IEnumerable GetUrlsOfTrendingRepositories(string customQuery = "https://github.com/trending");
IEnumerable GetFullTrendingRepositories(string customQuery = "https://github.com/trending");
```### User Profiles
```csharp
FullUserprofile GetFullUserprofile(string Username);
LightUserprofile GetLightUserprofile(string Username);
```### Full Repositories
```csharp
IEnumerable GetFullRepositories(string Username);
FullRepository GetFullRepository(string RepositoryUrl);
```### LightUserprofile, UserRepositories and TopValues of User
```csharp
(LightUserprofile Userprofile, IEnumerable UserRepositories, TopValues topValues) GetLightUserprofileWithRepositories(string Username);
```### Utils
```csharp
string GetTopicUrlFromTopicName(string topicName);
```## Types 🔖
- **FullUserprofile:** Represents a comprehensive user profile with additional information such as last year's contributions count and whether the user has a special readme enabled. This type is based on `LightUserprofile`.
- **LightUserprofile:** Represents a lightweight user profile with essential information like username, name, description, etc.
- **UserRepository:** Represents a user's repository with additional details like whether it's a fork, license text, and last update information. This type is based on `RepositoryBase`.
- **TrendRepository:** Represents a trending repository with information about stars received today, main language, total stars, total forks, etc. This type is based on `RepositoryBase`.
- **RepositoryBase:** Base class for repositories, containing shared information like main language, total stars, total forks, username, repository name, and description.
- **FullRepository:** Represents a comprehensive repository with additional details such as project URL, open issues count, open pull requests count, total commits count, etc. This type is based on `RepositoryBase`.
- **TopValues:** Contains top values such as the top language, total stars count, and total forks count across user repositories.
## Example ✍🏻
For a demonstration of the library's functionality, refer to the included `GithubNetDemo` project.
## To-Do
- Crawl every repository from a user, currently only the first page is crawled so these are not all repositories of a user.
## License 📜
GithubNet is licensed under the GNU General Public License v3.0.
You can read the full license details of the GNU General Public License v3.0 [here](https://choosealicense.com/licenses/gpl-3.0/).
## Disclaimer ⚠️
Please read the full disclaimer in the DISCLAIMER.md file before using this project.
The author (liebki) of the project and the project itself are not endorsed by Microsoft and do not reflect the views or opinions of Microsoft or any individuals officially involved with the project.
The author of this library is not responsible for any incorrect or inappropriate usage. Please ensure that you use this library in accordance with its intended purpose and guidelines.