Skip to content

Commit

Permalink
FEAT: started working on the event analysis data
Browse files Browse the repository at this point in the history
  • Loading branch information
SANKALP1011 committed Feb 17, 2024
1 parent 2ffe4ec commit 1e6f8df
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Components/Repository/TopRepoStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const TopRepoStatus: React.FC<TopRepoStatusProp> = ({ topRepo }) => {
</RoughNotation>

<h3 className="text-orange-400 font-sans font-extrabold mb-4 mt-5">{topRepo.Name}</h3>
<p className="text-blue-400 font-sans font-extrabold mb-2">Stars Count: {topRepo.StarsCount}</p>
<p className="text-green-500 font-sans font-extrabold mb-2">Language: {topRepo.Language}</p>
<p className="text-pink-600 font-sans font-extrabold mb-2">Date of Creation: {new Date(topRepo.DateOfCreation).toLocaleString()}</p>
<p className="text-blue-400 font-sans font-extrabold mb-2">Stars Count - {topRepo.StarsCount}</p>
<p className="text-green-500 font-sans font-extrabold mb-2">Language - {topRepo.Language}</p>
<p className="text-pink-600 font-sans font-extrabold mb-2">Creation - {new Date(topRepo.DateOfCreation).toLocaleString()}</p>
</Card>
</div>
);
Expand Down
33 changes: 33 additions & 0 deletions src/Services/analysis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,37 @@ export const getTopRepo = async(userId:string)=>{
return err;
}

}

export const getPushEventAnalysis = async(userId:string)=>{
const endPoint ="getUserPushEventsAnalysis"
try{
const response = await fetch(`${BASE_API}${endPoint}?id=${userId}`)
return response;
}
catch(err){
return err;
}
}

export const getWatchEventAnalysis = async(userId:string)=>{
const endPoint ="getUserWatchEventsAnalysis"
try{
const response = await fetch(`${BASE_API}${endPoint}?id=${userId}`)
return response;
}
catch(err){
return err;
}
}

export const getPullEventAnalysis = async(userId:string)=>{
const endPoint ="getUserWatchEventsAnalysis"
try{
const response = await fetch(`${BASE_API}${endPoint}?id=${userId}`)
return response;
}
catch(err){
return err;
}
}
2 changes: 1 addition & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

body{
background-color:black;
background-color: black;
}


Expand Down

0 comments on commit 1e6f8df

Please sign in to comment.