<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vasanap</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vasanap"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vasanap"/>
	<updated>2026-07-21T10:50:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155683</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155683"/>
		<updated>2024-04-13T03:54:35Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This project aims to create a robust tool enabling users to access and analyze their GitHub metrics conveniently. The phase one objective was to develop API endpoints leveraging GitHub GraphQL and GitHub REST queries within a Python Flask framework. This involves integrating Flask with existing code to expose GraphQL queries as API endpoints, building a REST client, and establishing REST endpoints for streamlined data retrieval. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Subsequently, in phase two of the project, each API endpoint established in the initial phase will be complemented with a React-based frontend. This frontend will be specifically designed to visualize and present the GitHub data retrieved through these endpoints in an intuitive user interface. The goal is to seamlessly integrate backend functionality with frontend design to enhance user interaction and data presentation.&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. &amp;lt;b&amp;gt;Setup React Environment&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Selecting Tooling and Libraries: Choose an appropriate React setup such as Create React App for rapid development or Next.js for server-side rendering and enhanced performance.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Dependency Management: Use npm or Yarn to manage project dependencies, including React, ReactDOM, and additional libraries for state management (Redux, Recoil), routing (React Router), and styling (styled-components, Tailwind CSS).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Project Structure: Organize the project structure with components, containers, services, and utility folders to maintain a scalable and maintainable codebase.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. &amp;lt;b&amp;gt;Design UI Components&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Translate the data from the API endpoints into interactive React components, focusing on usability and accessibility standards.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Component Composition: Create reusable and composable UI components following component-based design principles, leveraging hooks (useState, useEffect) for managing state and side effects.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Styling: Implement consistent styling using CSS-in-JS solutions like styled-components or CSS modules, ensuring modular and scoped styles for each component.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. &amp;lt;b&amp;gt;Integrate with API Endpoints&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;HTTP Requests: Use Axios or Fetch API to handle asynchronous data fetching from the backend API endpoints implemented in phase one.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;State Management: Implement state management (e.g., Redux, Context API) to store and manage fetched data centrally across components, ensuring efficient data flow and reactivity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Optimizing Performance: Implement memoization techniques (e.g., useMemo, useCallback) to optimize re-renders and reduce unnecessary API calls.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. &amp;lt;b&amp;gt;Implement Pagination&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Pagination Logic: Develop pagination logic to manage and display large datasets in manageable chunks, adhering to RESTful API standards for page-based navigation.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UI Components: Create pagination controls (e.g., buttons, page indicators) to allow users to navigate through paginated data smoothly, updating the UI dynamically based on user interactions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. &amp;lt;b&amp;gt;Enhance User Experience&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Interactive Visualizations: Integrate interactive charts (e.g., using Chart.js, D3.js) to visually represent data trends and insights, enhancing user engagement and understanding.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. &amp;lt;b&amp;gt;Test and Debug&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unit Testing: Write unit tests using Jest and React Testing Library to ensure individual components render correctly and exhibit expected behavior based on props and state.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Integration Testing: Conduct integration tests to validate API integrations, data flow, and interactions between frontend components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cross-Browser Compatibility: Perform cross-browser testing (e.g., Chrome, Firefox, Safari) and responsive testing to ensure consistent rendering and functionality across different browsers and devices.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. &amp;lt;b&amp;gt;Deploy and Document&amp;lt;/b&amp;gt;: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155682</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155682"/>
		<updated>2024-04-13T03:52:00Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This project aims to create a robust tool enabling users to access and analyze their GitHub metrics conveniently. The phase one objective was to develop API endpoints leveraging GitHub GraphQL and GitHub REST queries within a Python Flask framework. This involves integrating Flask with existing code to expose GraphQL queries as API endpoints, building a REST client, and establishing REST endpoints for streamlined data retrieval. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Subsequently, in phase two of the project, each API endpoint established in the initial phase will be complemented with a React-based frontend. This frontend will be specifically designed to visualize and present the GitHub data retrieved through these endpoints in an intuitive user interface. The goal is to seamlessly integrate backend functionality with frontend design to enhance user interaction and data presentation.&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. &amp;lt;b&amp;gt;Setup React Environment&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Selecting Tooling and Libraries: Choose an appropriate React setup such as Create React App for rapid development or Next.js for server-side rendering and enhanced performance.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Dependency Management: Use npm or Yarn to manage project dependencies, including React, ReactDOM, and additional libraries for state management (Redux, Recoil), routing (React Router), and styling (styled-components, Tailwind CSS).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Project Structure: Organize the project structure with components, containers, services, and utility folders to maintain a scalable and maintainable codebase.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. &amp;lt;b&amp;gt;Design UI Components&amp;lt;/b&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Translate the data from the API endpoints into interactive React components, focusing on usability and accessibility standards.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Component Composition: Create reusable and composable UI components following component-based design principles, leveraging hooks (useState, useEffect) for managing state and side effects.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Styling: Implement consistent styling using CSS-in-JS solutions like styled-components or CSS modules, ensuring modular and scoped styles for each component.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. &amp;lt;b&amp;gt;Integrate with API Endpoints&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;HTTP Requests: Use Axios or Fetch API to handle asynchronous data fetching from the backend API endpoints implemented in phase one.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;State Management: Implement state management (e.g., Redux, Context API) to store and manage fetched data centrally across components, ensuring efficient data flow and reactivity.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Optimizing Performance: Implement memoization techniques (e.g., useMemo, useCallback) to optimize re-renders and reduce unnecessary API calls.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. &amp;lt;b&amp;gt;Implement Pagination&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Pagination Logic: Develop pagination logic to manage and display large datasets in manageable chunks, adhering to RESTful API standards for page-based navigation.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UI Components: Create pagination controls (e.g., buttons, page indicators) to allow users to navigate through paginated data smoothly, updating the UI dynamically based on user interactions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. &amp;lt;b&amp;gt;Enhance User Experience&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Interactive Visualizations: Integrate interactive charts (e.g., using Chart.js, D3.js) to visually represent data trends and insights, enhancing user engagement and understanding.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. &amp;lt;b&amp;gt;Test and Debug&amp;lt;/b&amp;gt;: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unit Testing: Write unit tests using Jest and React Testing Library to ensure individual components render correctly and exhibit expected behavior based on props and state.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Integration Testing: Conduct integration tests to validate API integrations, data flow, and interactions between frontend components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cross-Browser Compatibility: Perform cross-browser testing (e.g., Chrome, Firefox, Safari) and responsive testing to ensure consistent rendering and functionality across different browsers and devices.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. &amp;lt;b&amp;gt;Deploy and Document&amp;lt;/b&amp;gt;: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155681</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155681"/>
		<updated>2024-04-13T03:27:36Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This project aims to create a robust tool enabling users to access and analyze their GitHub metrics conveniently. The phase one objective was to develop API endpoints leveraging GitHub GraphQL and GitHub REST queries within a Python Flask framework. This involves integrating Flask with existing code to expose GraphQL queries as API endpoints, building a REST client, and establishing REST endpoints for streamlined data retrieval. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Subsequently, in phase two of the project, each API endpoint established in the initial phase will be complemented with a React-based frontend. This frontend will be specifically designed to visualize and present the GitHub data retrieved through these endpoints in an intuitive user interface. The goal is to seamlessly integrate backend functionality with frontend design to enhance user interaction and data presentation.&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155680</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155680"/>
		<updated>2024-04-13T03:26:39Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This project aims to create a robust tool enabling users to access and analyze their GitHub metrics conveniently. The phase one objective was to develop API endpoints leveraging GitHub GraphQL and GitHub REST queries within a Python Flask framework. This involves integrating Flask with existing code to expose GraphQL queries as API endpoints, building a REST client, and establishing REST endpoints for streamlined data retrieval. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Subsequently, in phase two of the project, each API endpoint established in the initial phase will be complemented with a React-based frontend. This frontend will be specifically designed to visualize and present the GitHub data retrieved through these endpoints in an intuitive user interface. The goal is to seamlessly integrate backend functionality with frontend design to enhance user interaction and data presentation.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155679</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155679"/>
		<updated>2024-04-13T03:26:26Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This project aims to create a robust tool enabling users to access and analyze their GitHub metrics conveniently. The phase one objective was to develop API endpoints leveraging GitHub GraphQL and GitHub REST queries within a Python Flask framework. This involves integrating Flask with existing code to expose GraphQL queries as API endpoints, building a REST client, and establishing REST endpoints for streamlined data retrieval. &lt;br /&gt;
Subsequently, in phase two of the project, each API endpoint established in the initial phase will be complemented with a React-based frontend. This frontend will be specifically designed to visualize and present the GitHub data retrieved through these endpoints in an intuitive user interface. The goal is to seamlessly integrate backend functionality with frontend design to enhance user interaction and data presentation.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155678</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155678"/>
		<updated>2024-04-13T03:20:11Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This is a convenient tool to query a user's GitHub metrics. The project aims to develop API endpoints for GitHub GraphQL queries and GitHub REST queries using Python Flask. It involves integrating existing code with Flask to expose GraphQL queries as API endpoints, developing a REST client, and creating REST endpoints for querying the same data sets. The project also includes thorough testing and documentation of the endpoints.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155677</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155677"/>
		<updated>2024-04-13T03:19:33Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== Project Objective ==&lt;br /&gt;
This is a convenient tool to query a user's GitHub metrics. The project aims to develop API endpoints for GitHub GraphQL queries and GitHub REST queries using Python Flask. It involves integrating existing code with Flask to expose GraphQL queries as API endpoints, developing a REST client, and creating REST endpoints for querying the same data sets. The project also includes thorough testing and documentation of the endpoints.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Below is the MVC architecture of our GitHub project:==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MVC2.drawio.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Frontend==&lt;br /&gt;
As shown below, we plan to display contributors' individual contribution and commit count. We will be implementing the UI using ReactJS &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:GitHub contributors 1.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
Commits page with number of commits&lt;br /&gt;
[[File:Linux_commits.png|900px|Image : 900 pixels]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Linux_commits.png&amp;diff=155676</id>
		<title>File:Linux commits.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Linux_commits.png&amp;diff=155676"/>
		<updated>2024-04-13T03:18:35Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155568</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories - Part 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories_-_Part_2&amp;diff=155568"/>
		<updated>2024-04-09T03:00:42Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== GitHub Miner ==&lt;br /&gt;
This is a convenient tool to query a user's GitHub metrics. The project aims to develop API endpoints for GitHub GraphQL queries and GitHub REST queries using Python Flask. It involves integrating existing code with Flask to expose GraphQL queries as API endpoints, developing a REST client, and creating REST endpoints for querying the same data sets. The project also includes thorough testing and documentation of the endpoints.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
We recommend using virtual environment. Steps to set up virtual environment:&lt;br /&gt;
&lt;br /&gt;
 cd path/to/your/project/directory&lt;br /&gt;
 python -m venv venv&lt;br /&gt;
&lt;br /&gt;
On macOS and Linux:&lt;br /&gt;
 source venv/bin/activate&lt;br /&gt;
&lt;br /&gt;
On Windows (Command Prompt):&lt;br /&gt;
 .\venv\Scripts\activate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On Windows (PowerShell):&lt;br /&gt;
 .\venv\Scripts\Activate.ps1&lt;br /&gt;
&lt;br /&gt;
Next, install all the necessary libraries:&lt;br /&gt;
 pip -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Next, set the PYTHONPATH to&lt;br /&gt;
&lt;br /&gt;
On Windows&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
On Unix or MacOS&lt;br /&gt;
 export PYTHONPATH=$PYTHONPATH:/path/to/your/project&lt;br /&gt;
 export PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
You can run the app from your terminal by executing the following command:&lt;br /&gt;
 python backend\run.py&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves the login information of the currently authenticated user. It fetches the user's profile data from the GitHub API and returns details such as their username, avatar URL, and other relevant information.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint retrieves a list of all commits made to a specific repository. It takes the repository owner and repository name as parameters. The endpoint fetches the commit history from the GitHub API and returns details about each commit, such as the author, commit message, and changes made.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This endpoint fetches the details of all contributors to a specific repository. It takes the repository owner and repository name as parameters. The endpoint retrieves the list of contributors from the GitHub API and returns information about each contributor, such as their username, avatar URL, and permissions within the repository.&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
==Plan of Work==&lt;br /&gt;
In the second phase of the project, we will focus on developing a robust and user-friendly frontend using React. The frontend will serve as an intuitive interface for displaying and interacting with the data retrieved from the GitHub API endpoints implemented in the first phase.&lt;br /&gt;
&lt;br /&gt;
The plan includes the following key steps:&lt;br /&gt;
&lt;br /&gt;
1. **Setup React Environment**: We will set up a modern React development environment, including the necessary tooling, dependencies, and libraries required for building a performant and scalable frontend application.&lt;br /&gt;
&lt;br /&gt;
2. **Design UI Components**: We will design and develop reusable UI components to present the data from the API endpoints in a visually appealing and organized manner. These components will follow best practices for React component development, ensuring modularity, reusability, and maintainability.&lt;br /&gt;
&lt;br /&gt;
3. **Integrate with API Endpoints**: The React frontend will integrate seamlessly with the existing API endpoints. We will implement efficient HTTP request handling mechanisms to fetch data from the endpoints and update the UI components accordingly.&lt;br /&gt;
&lt;br /&gt;
4. **Implement Pagination**: For endpoints that return paginated data, we will implement intuitive pagination functionality in the React UI. This will allow users to navigate through the results smoothly, enhancing the overall user experience.&lt;br /&gt;
&lt;br /&gt;
5. **Enhance User Experience**: We will focus on improving the user experience by adding features such as search functionality, filtering, sorting, and other relevant enhancements based on the data being displayed. These enhancements will empower users to interact with the data more effectively and derive valuable insights.&lt;br /&gt;
&lt;br /&gt;
6. **Test and Debug**: Thorough testing and debugging will be a critical part of the development process. We will implement unit tests and end-to-end tests to ensure the React frontend functions correctly and consistently across different browsers and devices.&lt;br /&gt;
&lt;br /&gt;
7. **Deploy and Document**: Finally, we will deploy the React frontend to a hosting platform, ensuring it is accessible and easily usable by end-users. Comprehensive documentation will be provided, including instructions for setup, usage, and any relevant information for future maintenance and development.&lt;br /&gt;
&lt;br /&gt;
==Implementation Details==&lt;br /&gt;
The GitHub Miner project consists of two main components: the backend API and the frontend user interface.&lt;br /&gt;
&lt;br /&gt;
The backend API is implemented using Flask, a lightweight Python web framework. It exposes two sets of endpoints: one for GraphQL queries and another for REST API queries. Flask Blueprints are used to route requests to the appropriate endpoints based on the URL path.&lt;br /&gt;
&lt;br /&gt;
The GraphQL implementation utilizes the `graphene` library, which provides a way to define GraphQL schemas and resolvers. The resolvers are responsible for fetching data from the GitHub API using the `pygithub` library.&lt;br /&gt;
&lt;br /&gt;
The REST implementation uses the `requests` library to make HTTP requests to the GitHub API and process the responses.&lt;br /&gt;
&lt;br /&gt;
To ensure reliability and robustness, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
To ensure the reliability and robustness of the GitHub Miner, comprehensive testing strategies, including unit tests and integration tests, have been implemented. These tests validate the functionality of the API endpoints across different scenarios, ensuring the system's correctness and stability. The testing suite covers the following areas:&lt;br /&gt;
&lt;br /&gt;
=== Unit Tests ===&lt;br /&gt;
&lt;br /&gt;
Unit tests have been developed to test individual components in isolation, ensuring that each part functions correctly on its own. This includes testing the initialization, argument formatting, field formatting, string representation, and equality of query nodes, as well as the correct behavior of the query builders and authenticators. Examples of unit tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNode**: Validates the initialization, argument formatting, and field formatting of query nodes.&lt;br /&gt;
&lt;br /&gt;
- **TestQuery**: Ensures correct query initialization, argument substitution, and time formatting.&lt;br /&gt;
&lt;br /&gt;
- **TestQueryNodePaginator**: Tests the functionality of the paginator, including initialization, updating, and resetting.&lt;br /&gt;
&lt;br /&gt;
- **TestPaginatedQuery**: Validates the initialization and execution of paginated queries.&lt;br /&gt;
&lt;br /&gt;
=== Integration Tests ===&lt;br /&gt;
&lt;br /&gt;
Integration tests verify the interaction between different components of the system, ensuring that they work together as expected. This includes testing the behavior of the client when making actual requests to the GitHub API, handling authentication, executing queries, and processing paginated responses. Examples of integration tests include:&lt;br /&gt;
&lt;br /&gt;
- **TestClient**: Tests the GitHub client's initialization, header generation, retry logic, query execution, and handling of paginated queries.&lt;br /&gt;
- **Authentication Tests**: Validate the generation of correct authorization headers and the handling of personal access tokens.&lt;br /&gt;
&lt;br /&gt;
These tests collectively ensure that the GitHub Miner operates reliably, providing accurate and timely data from GitHub's APIs. By covering a wide range of scenarios, from successful queries to error handling and rate limiting, the tests ensure that the application can be used confidently in production environments.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-&amp;diff=155565</id>
		<title>CSC/ECE 517 Spring 2024 -</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-&amp;diff=155565"/>
		<updated>2024-04-09T02:46:22Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-&amp;diff=155564</id>
		<title>CSC/ECE 517 Spring 2024 -</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-&amp;diff=155564"/>
		<updated>2024-04-09T02:45:41Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: Created page with &amp;quot;# GitHub Data Viewer: React Frontend  This repository contains the frontend implementation for the GitHub Data Viewer project.   ## Project Overview  The project aims to build a React-based user interface that interacts with backend APIs to display GitHub repository and contributor data.  ## Getting Started  1. Clone this repository. 2. Navigate to the project directory. 3. Install dependencies: `npm install` 4. Start the development server: `npm start`  ## Project Struc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# GitHub Data Viewer: React Frontend&lt;br /&gt;
&lt;br /&gt;
This repository contains the frontend implementation for the GitHub Data Viewer project. &lt;br /&gt;
&lt;br /&gt;
## Project Overview&lt;br /&gt;
&lt;br /&gt;
The project aims to build a React-based user interface that interacts with backend APIs to display GitHub repository and contributor data.&lt;br /&gt;
&lt;br /&gt;
## Getting Started&lt;br /&gt;
&lt;br /&gt;
1. Clone this repository.&lt;br /&gt;
2. Navigate to the project directory.&lt;br /&gt;
3. Install dependencies: `npm install`&lt;br /&gt;
4. Start the development server: `npm start`&lt;br /&gt;
&lt;br /&gt;
## Project Structure&lt;br /&gt;
&lt;br /&gt;
- `/src`: Contains all the source code for the React application.&lt;br /&gt;
  - `/components`: Reusable UI components.&lt;br /&gt;
  - `/pages`: React components for different views (e.g., Home, Repository Detail).&lt;br /&gt;
  - `/services`: Axios service for API requests.&lt;br /&gt;
  - `/utils`: Helper functions and utilities.&lt;br /&gt;
- `/public`: Static assets and HTML template.&lt;br /&gt;
&lt;br /&gt;
## Available Scripts&lt;br /&gt;
&lt;br /&gt;
- `npm start`: Starts the development server.&lt;br /&gt;
- `npm test`: Launches the test runner.&lt;br /&gt;
&lt;br /&gt;
## Technologies Used&lt;br /&gt;
&lt;br /&gt;
- React&lt;br /&gt;
- Axios&lt;br /&gt;
- React Router&lt;br /&gt;
- Bootstrap (or Material-UI)&lt;br /&gt;
&lt;br /&gt;
## Contributors&lt;br /&gt;
- Atharva Pansare&lt;br /&gt;
- Sumedh Limburkar&lt;br /&gt;
- Viraj Sanap&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories&amp;diff=154753</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories&amp;diff=154753"/>
		<updated>2024-03-28T01:54:00Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== GitHub Miner ==&lt;br /&gt;
This is a convenient tool to query a user's GitHub metrics. The project aims to develop API endpoints for GitHub GraphQL queries and GitHub REST queries using Python Flask. It involves integrating existing code with Flask to expose GraphQL queries as API endpoints, developing a REST client, and creating REST endpoints for querying the same data sets. The project also includes thorough testing and documentation of the endpoints.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
We recommend using virtual environment. Steps to setup virtual environment:&lt;br /&gt;
&lt;br /&gt;
 cd path/to/your/project/directory&lt;br /&gt;
 python -m venv venv&lt;br /&gt;
&lt;br /&gt;
On macOS and Linux:&lt;br /&gt;
 source venv/bin/activate&lt;br /&gt;
&lt;br /&gt;
On Windows (Command Prompt):&lt;br /&gt;
 .\venv\Scripts\activate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On Windows (PowerShell):&lt;br /&gt;
 .\venv\Scripts\Activate.ps1&lt;br /&gt;
&lt;br /&gt;
Next, install all the necessary libraries:&lt;br /&gt;
 pip -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Next, set the PYTHONPATH to&lt;br /&gt;
&lt;br /&gt;
On Windows&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
On Unix or MacOS&lt;br /&gt;
 export PYTHONPATH=$PYTHONPATH:/path/to/your/project&lt;br /&gt;
 export PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
You can run the app from your terminal by executing the following command:&lt;br /&gt;
 python backend\run.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories&amp;diff=154752</id>
		<title>CSC/ECE 517 Spring 2024 - G2402 Implement REST client, REST API, and Graphql API endpoint for repositories</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_G2402_Implement_REST_client,_REST_API,_and_Graphql_API_endpoint_for_repositories&amp;diff=154752"/>
		<updated>2024-03-28T01:53:27Z</updated>

		<summary type="html">&lt;p&gt;Vasanap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== GitHub Miner ==&lt;br /&gt;
This is a convenient tool to query a user's GitHub metrics. The project aims to develop API endpoints for GitHub GraphQL queries and GitHub REST queries using Python Flask. It involves integrating existing code with Flask to expose GraphQL queries as API endpoints, developing a REST client, and creating REST endpoints for querying the same data sets. The project also includes thorough testing and documentation of the endpoints.&lt;br /&gt;
&lt;br /&gt;
==Live Demo &amp;amp; Source Code==&lt;br /&gt;
http://152.7.177.239:5000/auth/login Link]&lt;br /&gt;
(Please login using your personal GitHub accounts, not NCSU accounts)&lt;br /&gt;
&lt;br /&gt;
[https://github.ncsu.edu/slimbur/GH_Miner Source Code]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
We recommend using virtual environment. Steps to setup virtual environment:&lt;br /&gt;
&lt;br /&gt;
 cd path/to/your/project/directory&lt;br /&gt;
 python -m venv venv&lt;br /&gt;
&lt;br /&gt;
On macOS and Linux:&lt;br /&gt;
 source venv/bin/activate&lt;br /&gt;
&lt;br /&gt;
On Windows (Command Prompt):&lt;br /&gt;
 .\venv\Scripts\activate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On Windows (PowerShell):&lt;br /&gt;
 .\venv\Scripts\Activate.ps1&lt;br /&gt;
&lt;br /&gt;
Next, install all the necessary libraries:&lt;br /&gt;
 pip -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Next, set the PYTHONPATH to&lt;br /&gt;
&lt;br /&gt;
On Windows&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project&lt;br /&gt;
 set PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
On Unix or MacOS&lt;br /&gt;
 export PYTHONPATH=$PYTHONPATH:/path/to/your/project&lt;br /&gt;
 export PYTHONPATH=%PYTHONPATH%;path/to/your/project/backend&lt;br /&gt;
&lt;br /&gt;
You can run the app from your terminal by executing the following command:&lt;br /&gt;
 python backend\run.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GraphQL Endpoints==&lt;br /&gt;
&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/graphql/current-user-login&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;viewer&amp;quot;: {&lt;br /&gt;
     &amp;quot;login&amp;quot;: &amp;quot;&amp;lt;your-username&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get specific user login:&lt;br /&gt;
 /api/graphql/user-login/&amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/graphql/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                },&lt;br /&gt;
                &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                  &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/graphql/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;repository&amp;quot;: {&lt;br /&gt;
      &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
        &amp;quot;target&amp;quot;: {&lt;br /&gt;
          &amp;quot;history&amp;quot;: {&lt;br /&gt;
            &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;author&amp;quot;: {&lt;br /&gt;
                  &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                  &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                  &amp;quot;user&amp;quot;: {&lt;br /&gt;
                    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                  }&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
              &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
              &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
==REST API Endpoints==&lt;br /&gt;
Get current user login:&lt;br /&gt;
 /api/rest/current-user-login-rest&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
   &amp;quot;bio&amp;quot;: null,&lt;br /&gt;
   &amp;quot;blog&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;company&amp;quot;: null,&lt;br /&gt;
   &amp;quot;created_at&amp;quot;: &amp;quot;2020-03-04T16:49:06Z&amp;quot;,&lt;br /&gt;
   &amp;quot;email&amp;quot;: null,&lt;br /&gt;
   &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
   &amp;quot;followers&amp;quot;: 1,&lt;br /&gt;
   &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
   &amp;quot;following&amp;quot;: 3,&lt;br /&gt;
   &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
   &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
   &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
   &amp;quot;hireable&amp;quot;: null,&lt;br /&gt;
   &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
   &amp;quot;location&amp;quot;: null,&lt;br /&gt;
   &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
   &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
   &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
   &amp;quot;public_gists&amp;quot;: 0,&lt;br /&gt;
   &amp;quot;public_repos&amp;quot;: 11,&lt;br /&gt;
   &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
   &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
   &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
   &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
   &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
   &amp;quot;twitter_username&amp;quot;: null,&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
   &amp;quot;updated_at&amp;quot;: &amp;quot;2024-03-14T19:03:46Z&amp;quot;,&lt;br /&gt;
   &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get list of all commits in a repo:&lt;br /&gt;
 /api/rest/specific-user-commits/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
     &amp;quot;repository&amp;quot;: {&lt;br /&gt;
       &amp;quot;defaultBranchRef&amp;quot;: {&lt;br /&gt;
         &amp;quot;target&amp;quot;: {&lt;br /&gt;
           &amp;quot;history&amp;quot;: {&lt;br /&gt;
             &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
               {&lt;br /&gt;
                 &amp;quot;additions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;author&amp;quot;: {&lt;br /&gt;
                   &amp;quot;email&amp;quot;: &amp;quot;61797592+Atharva7007@users.noreply.github.com&amp;quot;,&lt;br /&gt;
                   &amp;quot;name&amp;quot;: &amp;quot;Atharva Pansare&amp;quot;,&lt;br /&gt;
                   &amp;quot;user&amp;quot;: {&lt;br /&gt;
                     &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;&lt;br /&gt;
                   }&lt;br /&gt;
                 },&lt;br /&gt;
                 &amp;quot;authoredDate&amp;quot;: &amp;quot;2020-04-03T09:30:17Z&amp;quot;,&lt;br /&gt;
                 &amp;quot;changedFilesIfAvailable&amp;quot;: 1,&lt;br /&gt;
                 &amp;quot;deletions&amp;quot;: 0,&lt;br /&gt;
                 &amp;quot;message&amp;quot;: &amp;quot;Add files via upload&amp;quot;,&lt;br /&gt;
                 &amp;quot;parents&amp;quot;: {&lt;br /&gt;
                   &amp;quot;totalCount&amp;quot;: 1&lt;br /&gt;
                 }&lt;br /&gt;
               }&lt;br /&gt;
             ],&lt;br /&gt;
             &amp;quot;pageInfo&amp;quot;: {&lt;br /&gt;
               &amp;quot;endCursor&amp;quot;: &amp;quot;98ba34a6c62ff6fe7c4d4de5c342a194f72d66e4 0&amp;quot;,&lt;br /&gt;
               &amp;quot;hasNextPage&amp;quot;: true&lt;br /&gt;
             },&lt;br /&gt;
             &amp;quot;totalCount&amp;quot;: 6&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get details of all contributors in a repo:&lt;br /&gt;
 /api/rest/repository-contributors/&amp;lt;owner&amp;gt;/&amp;lt;repo_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample Output:&lt;br /&gt;
[&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;avatar_url&amp;quot;: &amp;quot;https://avatars.githubusercontent.com/u/61797592?v=4&amp;quot;,&lt;br /&gt;
    &amp;quot;events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/events{/privacy}&amp;quot;,&lt;br /&gt;
    &amp;quot;followers_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/followers&amp;quot;,&lt;br /&gt;
    &amp;quot;following_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/following{/other_user}&amp;quot;,&lt;br /&gt;
    &amp;quot;gists_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/gists{/gist_id}&amp;quot;,&lt;br /&gt;
    &amp;quot;gravatar_id&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;html_url&amp;quot;: &amp;quot;https://github.com/Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;id&amp;quot;: 61797592,&lt;br /&gt;
    &amp;quot;login&amp;quot;: &amp;quot;Atharva7007&amp;quot;,&lt;br /&gt;
    &amp;quot;node_id&amp;quot;: &amp;quot;MDQ6VXNlcjYxNzk3NTky&amp;quot;,&lt;br /&gt;
    &amp;quot;organizations_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/orgs&amp;quot;,&lt;br /&gt;
    &amp;quot;permissions&amp;quot;: {&lt;br /&gt;
      &amp;quot;admin&amp;quot;: true,&lt;br /&gt;
      &amp;quot;maintain&amp;quot;: true,&lt;br /&gt;
      &amp;quot;pull&amp;quot;: true,&lt;br /&gt;
      &amp;quot;push&amp;quot;: true,&lt;br /&gt;
      &amp;quot;triage&amp;quot;: true&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;received_events_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/received_events&amp;quot;,&lt;br /&gt;
    &amp;quot;repos_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/repos&amp;quot;,&lt;br /&gt;
    &amp;quot;role_name&amp;quot;: &amp;quot;admin&amp;quot;,&lt;br /&gt;
    &amp;quot;site_admin&amp;quot;: false,&lt;br /&gt;
    &amp;quot;starred_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/starred{/owner}{/repo}&amp;quot;,&lt;br /&gt;
    &amp;quot;subscriptions_url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007/subscriptions&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;User&amp;quot;,&lt;br /&gt;
    &amp;quot;url&amp;quot;: &amp;quot;https://api.github.com/users/Atharva7007&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
== Implementation Details == &lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
In the API, we have 2 separate endpoints to retrieve the same data: one for REST and the other using GraphQL queries. To manage this, we have made use of Flask Blueprints where all the &amp;quot;api/graphql&amp;quot; requests get routed to the graphql variants and the &amp;quot;api/rest&amp;quot; requests get routed to the REST variants.&lt;br /&gt;
&lt;br /&gt;
=== Design Patterns used ===&lt;br /&gt;
# The REST API Client '''/backend/app/services/github_query/github_rest/client.py''' is a Singleton.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Atharva Pansare&lt;br /&gt;
&lt;br /&gt;
Sumedh Limburkar&lt;br /&gt;
&lt;br /&gt;
Viraj Sanap&lt;br /&gt;
&lt;br /&gt;
Mengning Li&lt;br /&gt;
&lt;br /&gt;
Mentor: Jialin Cui&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
GitHub REST API documentation - https://docs.github.com/en/rest?apiVersion=2022-11-28&lt;/div&gt;</summary>
		<author><name>Vasanap</name></author>
	</entry>
</feed>