From bd53cb400b07803b807c36ebbd3ca0e1197b4c56 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 29 Jun 2022 13:03:02 -0400 Subject: [PATCH] added models --- DeskHubSharpRevised/Models/Branch.cs | 10 +- DeskHubSharpRevised/Models/Email.cs | 30 ++- DeskHubSharpRevised/Models/License.cs | 21 +- DeskHubSharpRevised/Models/Owner.cs | 73 +++++- DeskHubSharpRevised/Models/RepoDetail.cs | 290 +++++++++++++++++++++- DeskHubSharpRevised/Models/RequestList.cs | 17 +- DeskHubSharpRevised/Models/Search.cs | 145 +++++++++++ DeskHubSharpRevised/Models/Sort.cs | 18 +- DeskHubSharpRevised/Models/User.cs | 32 ++- 9 files changed, 628 insertions(+), 8 deletions(-) diff --git a/DeskHubSharpRevised/Models/Branch.cs b/DeskHubSharpRevised/Models/Branch.cs index 6dd8c0c..7085c8c 100644 --- a/DeskHubSharpRevised/Models/Branch.cs +++ b/DeskHubSharpRevised/Models/Branch.cs @@ -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; } + } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/Email.cs b/DeskHubSharpRevised/Models/Email.cs index 90810aa..40b1931 100644 --- a/DeskHubSharpRevised/Models/Email.cs +++ b/DeskHubSharpRevised/Models/Email.cs @@ -2,5 +2,33 @@ 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; } + } + + /// + /// Constructor for the Email class + /// + public Email() + { + + } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/License.cs b/DeskHubSharpRevised/Models/License.cs index c7444fa..4984bb0 100644 --- a/DeskHubSharpRevised/Models/License.cs +++ b/DeskHubSharpRevised/Models/License.cs @@ -2,5 +2,24 @@ namespace DeskHubSharpRevised.Models; public class License { - + /// + /// + /// + public string key { get; set; } + /// + /// + /// + public string name { get; set; } + /// + /// + /// + public string spdx_id { get; set; } + /// + /// + /// + public string url { get; set; } + /// + /// + /// + public string node_id { get; set; } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/Owner.cs b/DeskHubSharpRevised/Models/Owner.cs index c2dbc19..75dcfd8 100644 --- a/DeskHubSharpRevised/Models/Owner.cs +++ b/DeskHubSharpRevised/Models/Owner.cs @@ -2,5 +2,76 @@ namespace DeskHubSharpRevised.Models; public class Owner { - + /// + /// + /// + 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; } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/RepoDetail.cs b/DeskHubSharpRevised/Models/RepoDetail.cs index 4aefd9a..6ee2621 100644 --- a/DeskHubSharpRevised/Models/RepoDetail.cs +++ b/DeskHubSharpRevised/Models/RepoDetail.cs @@ -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; } + /// + /// + /// + public string node_id { get; set; } + /// + /// + /// + public string name { get; set; } + /// + /// + /// + public string full_name { get; set; } + /// + /// + /// + //public string private { get; set; } + /// + /// + /// + public Owner owner { get; set; } + /// + /// + /// + public string html_url { get; set; } + /// + /// + /// + public string description { get; set; } + /// + /// + /// + public string fork { get; set; } + /// + /// + /// + public string url { get; set; } + /// + /// + /// + public string forks_url { get; set; } + /// + /// + /// + public string keys_url { get; set; } + /// + /// + /// + public string collaborators_url { get; set; } + /// + /// + /// + public string teams_url { get; set; } + /// + /// + /// + public string hooks_url { get; set; } + /// + /// + /// + public string issue_events_url { get; set; } + /// + /// + /// + public string events_url { get; set; } + /// + /// + /// + public string assignees_url { get; set; } + /// + /// + /// + public string branches_url { get; set; } + /// + /// + /// + public string tags_url { get; set; } + /// + /// + /// + public string blobs_url { get; set; } + /// + /// + /// + public string git_tags_url { get; set; } + /// + /// + /// + public string git_refs_url { get; set; } + /// + /// + /// + public string trees_url { get; set; } + /// + /// + /// + public string statuses_url { get; set; } + /// + /// + /// + public string languages_url { get; set; } + /// + /// + /// + public string stargazers_url { get; set; } + /// + /// + /// + public string contributors_url { get; set; } + /// + /// + /// + public string subscribers_url { get; set; } + /// + /// + /// + public string subscription_url { get; set; } + /// + /// + /// + public string commits_url { get; set; } + /// + /// + /// + public string git_commits_url { get; set; } + /// + /// + /// + public string comments_url { get; set; } + /// + /// + /// + public string issue_comment_url { get; set; } + /// + /// + /// + public string contents_url { get; set; } + /// + /// + /// + public string compare_url { get; set; } + /// + /// + /// + public string merges_url { get; set; } + /// + /// + /// + public string archive_url { get; set; } + /// + /// + /// + public string downloads_url { get; set; } + /// + /// + /// + public string issues_url { get; set; } + /// + /// + /// + public string pulls_url { get; set; } + /// + /// + /// + public string milestones_url { get; set; } + /// + /// + /// + public string notifications_url { get; set; } + /// + /// + /// + public string labels_url { get; set; } + /// + /// + /// + public string releases_url { get; set; } + /// + /// + /// + public string deployments_url { get; set; } + /// + /// + /// + public string created_at { get; set; } + /// + /// + /// + public string updated_at { get; set; } + /// + /// + /// + public string pushed_at { get; set; } + /// + /// + /// + public string git_url { get; set; } + /// + /// + /// + public string ssh_url { get; set; } + /// + /// + /// + public string clone_url { get; set; } + /// + /// + /// + public string svn_url { get; set; } + /// + /// + /// + public string homepage { get; set; } + /// + /// + /// + public int size { get; set; } + /// + /// + /// + public int stargazers_count { get; set; } + /// + /// + /// + public int watchers_count { get; set; } + /// + /// + /// + public string? language { get; set; } + /// + /// + /// + public string has_issues { get; set; } + /// + /// + /// + public string has_projects { get; set; } + /// + /// + /// + public string has_downloads { get; set; } + /// + /// + /// + public string has_wiki { get; set; } + /// + /// + /// + public string has_pages { get; set; } + /// + /// + /// + public int forks_count { get; set; } + /// + /// + /// + public string mirror_url { get; set; } + /// + /// + /// + public string archived { get; set; } + /// + /// + /// + public int open_issues_count { get; set; } + /// + /// + /// + public License license { get; set; } + /// + /// + /// + public int forks { get; set; } + /// + /// + /// + public int open_issues { get; set; } + /// + /// + /// + public int watchers { get; set; } + /// + /// + /// + public string default_branch { get; set; } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/RequestList.cs b/DeskHubSharpRevised/Models/RequestList.cs index 411a137..8a91d14 100644 --- a/DeskHubSharpRevised/Models/RequestList.cs +++ b/DeskHubSharpRevised/Models/RequestList.cs @@ -1,6 +1,21 @@ +using System.Collections.ObjectModel; + namespace DeskHubSharpRevised.Models; public class RequestList { - + /// + /// Stores everything in User, typically from the request + /// + public static User userDetail { get; set; } + + /// + /// Stores everything sent in Branch, typically from request + /// + public static ObservableCollection branchDetail { get; set; } + + /// + /// Stores everything sent in RepoDetail, typically from request + /// + public static ObservableCollection repoDetail { get; set; } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/Search.cs b/DeskHubSharpRevised/Models/Search.cs index 682769e..625fcd5 100644 --- a/DeskHubSharpRevised/Models/Search.cs +++ b/DeskHubSharpRevised/Models/Search.cs @@ -1,6 +1,151 @@ +using System.Collections.Generic; + namespace DeskHubSharpRevised.Models; public class Search { + public class Owner + { + /// + /// + /// + 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 received_events_url { get; set; } + /// + /// + /// + public string type { get; set; } + } + public class ItemsItem + { + /// + /// + /// + public int id { get; set; } + /// + /// + /// + public string node_id { get; set; } + /// + /// + /// + public string name { get; set; } + /// + /// + /// + public string full_name { get; set; } + /// + /// + /// + public Owner owner { get; set; } + /// + /// + /// + public string privates { get; set; } + /// + /// + /// + public string html_url { get; set; } + /// + /// + /// + public string description { get; set; } + /// + /// + /// + public string fork { get; set; } + /// + /// + /// + public string url { get; set; } + /// + /// + /// + public string created_at { get; set; } + /// + /// + /// + public string updated_at { get; set; } + /// + /// + /// + public string pushed_at { get; set; } + /// + /// + /// + public string homepage { get; set; } + /// + /// + /// + public int size { get; set; } + /// + /// + /// + public int stargazers_count { get; set; } + /// + /// + /// + public int watchers_count { get; set; } + /// + /// + /// + public string language { get; set; } + /// + /// + /// + public int forks_count { get; set; } + /// + /// + /// + public int open_issues_count { get; set; } + /// + /// + /// + public string master_branch { get; set; } + /// + /// + /// + public string default_branch { get; set; } + /// + /// + /// + public double score { get; set; } + } + + /// + /// + /// + public int total_count { get; set; } + /// + /// + /// + public string incomplete_results { get; set; } + /// + /// + /// + public List items { get; set; } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/Sort.cs b/DeskHubSharpRevised/Models/Sort.cs index 872be4f..a8cdbd3 100644 --- a/DeskHubSharpRevised/Models/Sort.cs +++ b/DeskHubSharpRevised/Models/Sort.cs @@ -1,6 +1,22 @@ +using System.Collections.Generic; + namespace DeskHubSharpRevised.Models; public class Sort { - + public Sort() + { + + } + + public List GetSortTerms() + { + List sortTerms = new List(); + sortTerms.Add("A - Z"); + sortTerms.Add("Least to most Stars"); + sortTerms.Add("Least to most Forks"); + sortTerms.Add("Least to most Watchers"); + + return sortTerms; + } } \ No newline at end of file diff --git a/DeskHubSharpRevised/Models/User.cs b/DeskHubSharpRevised/Models/User.cs index 156c557..0c680be 100644 --- a/DeskHubSharpRevised/Models/User.cs +++ b/DeskHubSharpRevised/Models/User.cs @@ -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; } } \ No newline at end of file