mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
Some minor amendments
This commit is contained in:
+14
-23
@@ -134,40 +134,31 @@ var request = new SearchRepositoriesRequest("mvc client side framework")
|
||||
{
|
||||
// lets find a library with over 1k stars
|
||||
Stars = Range.GreaterThan(1000),
|
||||
|
||||
|
||||
// we can specify how big we want the repo to be in kilobytes
|
||||
Size = Range.GreaterThan(1),
|
||||
|
||||
|
||||
// maybe we want the library to have over 50 forks?
|
||||
Forks = Range.GreaterThan(50),
|
||||
|
||||
|
||||
// we may want to include or exclude the forks too
|
||||
Fork = ForkQualifier.IncludeForks,
|
||||
|
||||
|
||||
// how about we restrict the language the library is written in?
|
||||
Language = Language.JavaScript,
|
||||
|
||||
|
||||
// maybe we want to include searching in the read me?
|
||||
In = new[] { InQualifier.Readme },
|
||||
|
||||
// how about only the name of the project?
|
||||
In = new[] { InQualifier.Name },
|
||||
|
||||
// or search the readme, name or description?
|
||||
|
||||
// or go all out and search the readme, name or description?
|
||||
In = new[] { InQualifier.Readme, InQualifier.Description, InQualifier.Name },
|
||||
|
||||
// how about searching for libraries created before a given date?
|
||||
|
||||
// how about searching for libraries created after a given date?
|
||||
Created = DateRange.GreaterThan(new DateTime(2015, 1, 1)),
|
||||
|
||||
// or after a given date?
|
||||
Created = DateRange.LessThan(new DateTime(2015, 1, 1)),
|
||||
|
||||
// or maybe the last time this repo was updated?
|
||||
Updated = DateRange.GreaterThan(new DateTime(2013, 1, 1)),
|
||||
|
||||
// or maybe updated between a given date?
|
||||
|
||||
// or maybe check for repos that have been updated between a given date range?
|
||||
Updated = DateRange.Between(new DateTime(2012, 4, 30), new DateTime(2012, 7, 4)),
|
||||
|
||||
|
||||
// we can also restrict the owner of the repo if we so wish
|
||||
User = "dhh"
|
||||
};
|
||||
@@ -180,10 +171,10 @@ var request = new SearchRepositoriesRequest("mvc client side framework")
|
||||
{
|
||||
// sort by the number of stars
|
||||
SortField = RepoSearchSort.Stars,
|
||||
|
||||
|
||||
// or by forks?
|
||||
SortField = RepoSearchSort.Forks,
|
||||
|
||||
|
||||
// how about changing that sort direction?
|
||||
Order = SortDirection.Ascending
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user