added models

This commit is contained in:
Wyatt J. Miller 2022-06-29 13:03:02 -04:00
parent 0331399b36
commit bd53cb400b
9 changed files with 628 additions and 8 deletions

View File

@ -2,5 +2,13 @@ namespace DeskHubSharpRevised.Models;
public class Branch
{
public string name { get; set; }
public Commit commit { get; set; }
public class Commit
{
public string sha { get; set; }
public string url { get; set; }
}
}

View File

@ -1,6 +1,34 @@
namespace DeskHubSharpRevised.Models;
public class Email
{
private string _toEmail = "wjmiller2016@gmail.com";
private string _fromEmail = "wjmiller2016@gmail.com";
private string _passwordEmail = "password";
public string Password
{
get { return _passwordEmail; }
set { _passwordEmail = value; }
}
public string FromEmail
{
get { return _fromEmail; }
set { _fromEmail = value; }
}
public string ToEmail
{
get { return _toEmail; }
set { _toEmail = value; }
}
/// <summary>
/// Constructor for the Email class
/// </summary>
public Email()
{
}
}

View File

@ -2,5 +2,24 @@ namespace DeskHubSharpRevised.Models;
public class License
{
/// <summary>
///
/// </summary>
public string key { get; set; }
/// <summary>
///
/// </summary>
public string name { get; set; }
/// <summary>
///
/// </summary>
public string spdx_id { get; set; }
/// <summary>
///
/// </summary>
public string url { get; set; }
/// <summary>
///
/// </summary>
public string node_id { get; set; }
}

View File

@ -2,5 +2,76 @@ namespace DeskHubSharpRevised.Models;
public class Owner
{
/// <summary>
///
/// </summary>
public string login { get; set; }
/// <summary>
///
/// </summary>
public int id { get; set; }
/// <summary>
///
/// </summary>
public string node_id { get; set; }
/// <summary>
///
/// </summary>
public string avatar_url { get; set; }
/// <summary>
///
/// </summary>
public string gravatar_id { get; set; }
/// <summary>
///
/// </summary>
public string url { get; set; }
/// <summary>
///
/// </summary>
public string html_url { get; set; }
/// <summary>
///
/// </summary>
public string followers_url { get; set; }
/// <summary>
///
/// </summary>
public string following_url { get; set; }
/// <summary>
///
/// </summary>
public string gists_url { get; set; }
/// <summary>
///
/// </summary>
public string starred_url { get; set; }
/// <summary>
///
/// </summary>
public string subscriptions_url { get; set; }
/// <summary>
///
/// </summary>
public string organizations_url { get; set; }
/// <summary>
///
/// </summary>
public string repos_url { get; set; }
/// <summary>
///
/// </summary>
public string events_url { get; set; }
/// <summary>
///
/// </summary>
public string received_events_url { get; set; }
/// <summary>
///
/// </summary>
public string type { get; set; }
/// <summary>
///
/// </summary>
public string site_admin { get; set; }
}

View File

@ -2,5 +2,293 @@ namespace DeskHubSharpRevised.Models;
public class RepoDetail
{
public Owner Owner { get; set; }
public License License { get; set; }
public int id { get; set; }
/// <summary>
///
/// </summary>
public string node_id { get; set; }
/// <summary>
///
/// </summary>
public string name { get; set; }
/// <summary>
///
/// </summary>
public string full_name { get; set; }
/// <summary>
///
/// </summary>
//public string private { get; set; }
/// <summary>
///
/// </summary>
public Owner owner { get; set; }
/// <summary>
///
/// </summary>
public string html_url { get; set; }
/// <summary>
///
/// </summary>
public string description { get; set; }
/// <summary>
///
/// </summary>
public string fork { get; set; }
/// <summary>
///
/// </summary>
public string url { get; set; }
/// <summary>
///
/// </summary>
public string forks_url { get; set; }
/// <summary>
///
/// </summary>
public string keys_url { get; set; }
/// <summary>
///
/// </summary>
public string collaborators_url { get; set; }
/// <summary>
///
/// </summary>
public string teams_url { get; set; }
/// <summary>
///
/// </summary>
public string hooks_url { get; set; }
/// <summary>
///
/// </summary>
public string issue_events_url { get; set; }
/// <summary>
///
/// </summary>
public string events_url { get; set; }
/// <summary>
///
/// </summary>
public string assignees_url { get; set; }
/// <summary>
///
/// </summary>
public string branches_url { get; set; }
/// <summary>
///
/// </summary>
public string tags_url { get; set; }
/// <summary>
///
/// </summary>
public string blobs_url { get; set; }
/// <summary>
///
/// </summary>
public string git_tags_url { get; set; }
/// <summary>
///
/// </summary>
public string git_refs_url { get; set; }
/// <summary>
///
/// </summary>
public string trees_url { get; set; }
/// <summary>
///
/// </summary>
public string statuses_url { get; set; }
/// <summary>
///
/// </summary>
public string languages_url { get; set; }
/// <summary>
///
/// </summary>
public string stargazers_url { get; set; }
/// <summary>
///
/// </summary>
public string contributors_url { get; set; }
/// <summary>
///
/// </summary>
public string subscribers_url { get; set; }
/// <summary>
///
/// </summary>
public string subscription_url { get; set; }
/// <summary>
///
/// </summary>
public string commits_url { get; set; }
/// <summary>
///
/// </summary>
public string git_commits_url { get; set; }
/// <summary>
///
/// </summary>
public string comments_url { get; set; }
/// <summary>
///
/// </summary>
public string issue_comment_url { get; set; }
/// <summary>
///
/// </summary>
public string contents_url { get; set; }
/// <summary>
///
/// </summary>
public string compare_url { get; set; }
/// <summary>
///
/// </summary>
public string merges_url { get; set; }
/// <summary>
///
/// </summary>
public string archive_url { get; set; }
/// <summary>
///
/// </summary>
public string downloads_url { get; set; }
/// <summary>
///
/// </summary>
public string issues_url { get; set; }
/// <summary>
///
/// </summary>
public string pulls_url { get; set; }
/// <summary>
///
/// </summary>
public string milestones_url { get; set; }
/// <summary>
///
/// </summary>
public string notifications_url { get; set; }
/// <summary>
///
/// </summary>
public string labels_url { get; set; }
/// <summary>
///
/// </summary>
public string releases_url { get; set; }
/// <summary>
///
/// </summary>
public string deployments_url { get; set; }
/// <summary>
///
/// </summary>
public string created_at { get; set; }
/// <summary>
///
/// </summary>
public string updated_at { get; set; }
/// <summary>
///
/// </summary>
public string pushed_at { get; set; }
/// <summary>
///
/// </summary>
public string git_url { get; set; }
/// <summary>
///
/// </summary>
public string ssh_url { get; set; }
/// <summary>
///
/// </summary>
public string clone_url { get; set; }
/// <summary>
///
/// </summary>
public string svn_url { get; set; }
/// <summary>
///
/// </summary>
public string homepage { get; set; }
/// <summary>
///
/// </summary>
public int size { get; set; }
/// <summary>
///
/// </summary>
public int stargazers_count { get; set; }
/// <summary>
///
/// </summary>
public int watchers_count { get; set; }
/// <summary>
///
/// </summary>
public string? language { get; set; }
/// <summary>
///
/// </summary>
public string has_issues { get; set; }
/// <summary>
///
/// </summary>
public string has_projects { get; set; }
/// <summary>
///
/// </summary>
public string has_downloads { get; set; }
/// <summary>
///
/// </summary>
public string has_wiki { get; set; }
/// <summary>
///
/// </summary>
public string has_pages { get; set; }
/// <summary>
///
/// </summary>
public int forks_count { get; set; }
/// <summary>
///
/// </summary>
public string mirror_url { get; set; }
/// <summary>
///
/// </summary>
public string archived { get; set; }
/// <summary>
///
/// </summary>
public int open_issues_count { get; set; }
/// <summary>
///
/// </summary>
public License license { get; set; }
/// <summary>
///
/// </summary>
public int forks { get; set; }
/// <summary>
///
/// </summary>
public int open_issues { get; set; }
/// <summary>
///
/// </summary>
public int watchers { get; set; }
/// <summary>
///
/// </summary>
public string default_branch { get; set; }
}

View File

@ -1,6 +1,21 @@
using System.Collections.ObjectModel;
namespace DeskHubSharpRevised.Models;
public class RequestList
{
/// <summary>
/// Stores everything in User, typically from the request
/// </summary>
public static User userDetail { get; set; }
/// <summary>
/// Stores everything sent in Branch, typically from request
/// </summary>
public static ObservableCollection<Branch> branchDetail { get; set; }
/// <summary>
/// Stores everything sent in RepoDetail, typically from request
/// </summary>
public static ObservableCollection<RepoDetail> repoDetail { get; set; }
}

View File

@ -1,6 +1,151 @@
using System.Collections.Generic;
namespace DeskHubSharpRevised.Models;
public class Search
{
public class Owner
{
/// <summary>
///
/// </summary>
public string login { get; set; }
/// <summary>
///
/// </summary>
public int id { get; set; }
/// <summary>
///
/// </summary>
public string node_id { get; set; }
/// <summary>
///
/// </summary>
public string avatar_url { get; set; }
/// <summary>
///
/// </summary>
public string gravatar_id { get; set; }
/// <summary>
///
/// </summary>
public string url { get; set; }
/// <summary>
///
/// </summary>
public string received_events_url { get; set; }
/// <summary>
///
/// </summary>
public string type { get; set; }
}
public class ItemsItem
{
/// <summary>
///
/// </summary>
public int id { get; set; }
/// <summary>
///
/// </summary>
public string node_id { get; set; }
/// <summary>
///
/// </summary>
public string name { get; set; }
/// <summary>
///
/// </summary>
public string full_name { get; set; }
/// <summary>
///
/// </summary>
public Owner owner { get; set; }
/// <summary>
///
/// </summary>
public string privates { get; set; }
/// <summary>
///
/// </summary>
public string html_url { get; set; }
/// <summary>
///
/// </summary>
public string description { get; set; }
/// <summary>
///
/// </summary>
public string fork { get; set; }
/// <summary>
///
/// </summary>
public string url { get; set; }
/// <summary>
///
/// </summary>
public string created_at { get; set; }
/// <summary>
///
/// </summary>
public string updated_at { get; set; }
/// <summary>
///
/// </summary>
public string pushed_at { get; set; }
/// <summary>
///
/// </summary>
public string homepage { get; set; }
/// <summary>
///
/// </summary>
public int size { get; set; }
/// <summary>
///
/// </summary>
public int stargazers_count { get; set; }
/// <summary>
///
/// </summary>
public int watchers_count { get; set; }
/// <summary>
///
/// </summary>
public string language { get; set; }
/// <summary>
///
/// </summary>
public int forks_count { get; set; }
/// <summary>
///
/// </summary>
public int open_issues_count { get; set; }
/// <summary>
///
/// </summary>
public string master_branch { get; set; }
/// <summary>
///
/// </summary>
public string default_branch { get; set; }
/// <summary>
///
/// </summary>
public double score { get; set; }
}
/// <summary>
///
/// </summary>
public int total_count { get; set; }
/// <summary>
///
/// </summary>
public string incomplete_results { get; set; }
/// <summary>
///
/// </summary>
public List<ItemsItem> items { get; set; }
}

View File

@ -1,6 +1,22 @@
using System.Collections.Generic;
namespace DeskHubSharpRevised.Models;
public class Sort
{
public Sort()
{
}
public List<string> GetSortTerms()
{
List<string> sortTerms = new List<string>();
sortTerms.Add("A - Z");
sortTerms.Add("Least to most Stars");
sortTerms.Add("Least to most Forks");
sortTerms.Add("Least to most Watchers");
return sortTerms;
}
}

View File

@ -2,5 +2,35 @@ namespace DeskHubSharpRevised.Models;
public class User
{
public string login { get; set; }
public int id { get; set; }
public string node_id { get; set; }
public string avatar_url { get; set; }
public string gravatar_id { get; set; }
public string url { get; set; }
public string html_url { get; set; }
public string followers_url { get; set; }
public string following_url { get; set; }
public string gists_url { get; set; }
public string starred_url { get; set; }
public string subscriptions_url { get; set; }
public string organizations_url { get; set; }
public string repos_url { get; set; }
public string events_url { get; set; }
public string received_events_url { get; set; }
public string type { get; set; }
public string site_admin { get; set; }
public string name { get; set; }
public string company { get; set; }
public string blog { get; set; }
public string location { get; set; }
public string email { get; set; }
public string hireable { get; set; }
public string bio { get; set; }
public int public_repos { get; set; }
public int public_gists { get; set; }
public int followers { get; set; }
public int following { get; set; }
public string created_at { get; set; }
public string updated_at { get; set; }
}