You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cout << "This application currently only supports GitHub's API system." << endl;
67
74
cout << "For your own reference the base URL is https://api.github.com/" << endl;
68
-
cout << "Choose whether you would like to embed a single repository or a list (found using filters). [R (single repo)/L (list of repos) [FUTURE RELEASE] ";
75
+
cout << "Choose whether you would like to embed a single repository or a list (found using filters). [R (single repo)/L (list of repos) ";
69
76
cin >> repoSearchType;
70
77
system("cls");
71
78
if (repoSearchType == "R" || repoSearchType == "r") {
@@ -95,13 +102,52 @@ int apiSys() {
95
102
system("cls");
96
103
returnfileSys();
97
104
}
105
+
elseif (repoSearchType == "l" || "L") {
106
+
cout << "There are many ways to get a list of repositories. With GitHub you have to search with a filter." << endl;
107
+
cout << "To get a full list of filters, go to https://help.github.com/en/github/searching-for-information-on-github/searching-for-repositories" << endl;
108
+
cout << "Do you already have a search API URL? [Y/N] ";
109
+
cin >> listLinkExist;
110
+
system("cls");
111
+
if (listLinkExist == "y" || listLinkExist == "Y") {
112
+
cout << "Great that will make this a lot easier!" << endl;
113
+
}
114
+
elseif (listLinkExist == "n" || listLinkExist == "N") {
115
+
cout << "Type the filter you want to use." << endl;
116
+
cout << "Filter by in the name [inname] \
117
+
\nFilter by in the description [indesc] \
118
+
\nFilter by in the README [inreadme] \
119
+
\nFilter by user's name [username] \
120
+
\nFilter by organization [orgname] \
121
+
\nFilter by size (MB size.) [exactsize (filter by repos with exact size) / (there are other options that are not built in to API++ yet)] \
122
+
\nFilter by number of followers [follown / (there are other options that are not built in to API++ yet)] \
123
+
\nFilter by number of forks [forksn / (there are other options that are not built in to API++ yet)] \
124
+
\nFilter by number of stars [starsn / (there are other options that are not built in to API++ yet)] \
125
+
\nFilter by date created [datec] \
126
+
\nFilter by date pushed [datep] \
127
+
\nFilter by language [lang] \
128
+
\nFilter by topic [topic] \
129
+
\nFilter by number of topics [topicsn] \
130
+
\nFilter by license keyword [license] \
131
+
\nFilter by public or private [pubpri] \
132
+
\nFilter by whether a repo is a mirror or not [mirror] \
133
+
\nFilter by whether a repo has been archived or not [arch] \
134
+
" << endl;
135
+
returnfileSys();
136
+
}
137
+
else {
138
+
cout << "Whoops! Not one of your options! (API++ is still going to say you don't have a link)" << endl;
139
+
returnfileSys();
140
+
}
141
+
}
98
142
else {
99
-
cout << "Sorry! The only option you have right now is to embed one repository at a time. Make sure to type R next time." << endl;
143
+
cout << "Not one of your options" << endl;
100
144
system("cls");
101
145
returnapiSys();
102
146
}
103
147
}
104
148
intfileSys() {
149
+
intsingleFile();
150
+
intlistFile();
105
151
ofstream file;
106
152
//get file info
107
153
if (javascriptFile == true) {
@@ -127,8 +173,22 @@ int fileSys() {
127
173
cout << fullFilePath << endl;
128
174
cin >> fullFilePathConfirm;
129
175
system("cls");
130
-
176
+
//confirm that user is satisfied with full file path
131
177
if (fullFilePathConfirm == "Y" || fullFilePathConfirm == "y") {
178
+
if (repoSearchType == "r" || repoSearchType == "R") {
0 commit comments