7
7
public interface IServerAPICalls
8
8
{
9
9
#region Methods
10
- // Find-PSResource >>> IFindPSResource (loops, version) >>> IServerAPICalls (http://www.powershellgallery.com/api/v2/Search()?$filter=IsLatestVersion)
11
-
12
- /// <summary>
13
- /// Find method which allows for searching for all packages from a repository and returns latest version for each.
14
- /// Examples: Search -Repository PSGallery
15
- /// API call:
16
- /// - Include prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsAbsoluteLatestVersion&includePrerelease=true
17
- /// </summary>
18
- string FindAllWithNoPrerelease ( PSRepositoryInfo repository , out string errRecord ) ;
19
-
20
10
/// <summary>
21
11
/// Find method which allows for searching for all packages from a repository and returns latest version for each.
22
12
/// Examples: Search -Repository PSGallery
23
13
/// API call:
24
14
/// - Include prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsAbsoluteLatestVersion&includePrerelease=true
25
15
/// </summary>
26
- string FindAllWithPrerelease ( PSRepositoryInfo repository , out string errRecord ) ;
27
-
16
+ string FindAll ( PSRepositoryInfo repository , bool includePrerelease , ResourceType type , out string errRecord ) ;
28
17
29
18
/// <summary>
30
19
/// Find method which allows for searching for packages with tag from a repository and returns latest version for each.
@@ -33,37 +22,7 @@ public interface IServerAPICalls
33
22
/// - Include prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsAbsoluteLatestVersion&searchTerm='tag:JSON'&includePrerelease=true
34
23
/// </summary>
35
24
string [ ] FindTag ( string tag , PSRepositoryInfo repository , bool includePrerelease , ResourceType _type , out string errRecord ) ;
36
-
37
-
38
- /// <summary>
39
- /// Find method which allows for searching for packages with resource type specified from a repository and returns latest version for each.
40
- /// Name: supports wildcards
41
- /// Type: Module, Script, Command, DSCResource (can take multiple)
42
- /// Examples: Search -Type Module -Repository PSGallery
43
- /// Search -Type Module -Name "Az*" -Repository PSGallery
44
- /// TODO: discuss consolidating Modules and Scripts endpoints (move scripts to modules endpoint)
45
- /// TODO Note: searchTerm is tokenized by whitespace.
46
- /// - Include prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsLatestVersion&searchTerm='az* tag:PSScript'&includePrerelease=true
47
- /// </summary>
48
- string FindTypesWithPrerelease ( ResourceType packageResourceType , string packageName , PSRepositoryInfo repository , out string errRecord ) ;
49
-
50
-
51
- /// <summary>
52
- /// Find method which allows for searching for command names and returns latest version of matching packages.
53
- /// Name: supports wildcards.
54
- /// Examples: Search -Name "Command1", "Command2" -Repository PSGallery
55
- /// - No prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsLatestVersion&searchTerm='Az* tag:PSCommand_Command1 tag:PSCommand_Command2'
56
- /// </summary>
57
- string FindCommandNameWithNoPrerelease ( string [ ] commandNames , PSRepositoryInfo repository , out string errRecord ) ;
58
25
59
- /// <summary>
60
- /// Find method which allows for searching for command names and returns latest version of matching packages.
61
- /// Name: supports wildcards.
62
- /// Examples: Search -Name "Command1", "Command2" -Repository PSGallery
63
- /// - Include prerelease: http://www.powershellgallery.com/api/v2/Search()?$filter=IsLatestVersion&searchTerm='Az* tag:PSCommand_Command1 tag:PSCommand_Command2'&includePrerelease=true
64
- /// </summary>
65
- string FindCommandNameWithPrerelease ( string [ ] commandNames , PSRepositoryInfo repository , out string errRecord ) ;
66
-
67
26
/// <summary>
68
27
/// Find method which allows for searching for single name and returns latest version.
69
28
/// Name: no wildcard support
@@ -96,53 +55,6 @@ public interface IServerAPICalls
96
55
/// </summary>
97
56
string FindVersionGlobbing ( string packageName , VersionRange versionRange , PSRepositoryInfo repository , bool includePrerelease , ResourceType type , out string errRecord ) ;
98
57
99
- /// <summary>
100
- /// *** we will not support this scenario ***
101
- /// Find method which allows for searching for single name with wildcards with version range.
102
- /// Name: supports wildcards
103
- /// Version: support wildcards
104
- /// Examples: Search "PowerShell*" "[3.0.0.0, 5.0.0.0]"
105
- /// Search "PowerShell*" "3.*"
106
- /// </summary>
107
- /// PSResourceInfo FindNameGlobbingAndVersionGlobbing(string packageName, VersionRange versionRange, PSRepositoryInfo repository, bool includePrerelease);
108
-
109
- /// <summary>
110
- /// *** we will not support this scenario ***
111
- /// Find method which allows for searching for single name with wildcards with specific version.
112
- /// Name: supports wildcards
113
- /// Version: no wildcard support
114
- /// Examples: Search "PowerShell*" "3.0.0.0"
115
- /// </summary>
116
- /// PSResourceInfo FindNameGlobbingAndVersion(string packageName, NuGetVersion version, PSRepositoryInfo repository);
117
-
118
- /// <summary>
119
- /// *** Note: we would just iterate through the names client side and call FindName() or FindNameGlobbing() ***
120
- /// Find method which allows for searching for multiple names and returns latest version for each.
121
- /// Name: supports wildcards
122
- /// Examples: Search "PowerShellGet", "Package*", "PSReadLine"
123
- /// </summary>
124
- /// PSResourceInfo FindNamesGlobbing(string[] packageNames, PSRepositoryInfo repository, bool includePrerelease);
125
-
126
- /// <summary>
127
- /// *** we will not support this scenario ***
128
- /// Find method which allows for searching for multiple names with specific version.
129
- /// Name: supports wildcards
130
- /// Version: no wildcard support
131
- /// Examples: Search "PowerShellGet", "Package*", "PSReadLine" "3.0.0.0"
132
- /// </summary>
133
- /// PSResourceInfo FindNamesGlobbingAndVersion(string[] packageNames, NuGetVersion version, PSRepositoryInfo repository);
134
-
135
- /// <summary>
136
- /// *** Note: would just iterate through names client side, and call FindVersionGlobbing() for each and discard (error) for name with globbing) ***
137
- /// Find method which allows for searching for multiple names with version range.
138
- /// Name: supports wildcards
139
- /// Version: support wildcards
140
- /// Examples: Search "PowerShellGet", "Package*", "PSReadLine" "[3.0.0.0, 5.0.0.0]" --> do it for first, write error for second, do it for third
141
- /// Search "PowerShellGet", "Package*", "PSReadLine" "3.*" --> do it for first, write error for second, do it for third
142
- /// Search "Package*", "PSReadLin*" "3.*" --> not supported
143
- /// </summary>
144
- /// PSResourceInfo FindNamesAndVersionGlobbing(string[] packageNames, VersionRange versionRange, PSRepositoryInfo repository, bool includePrerelease);
145
-
146
58
// <summary>
147
59
/// Find method which allows for searching for single name with specific version.
148
60
/// Name: no wildcard support
0 commit comments