@@ -122,7 +122,23 @@ WebClient Api()
122
122
return api ;
123
123
}
124
124
125
- protected internal string DoCommand ( string command , string arg = null , params string [ ] options )
125
+ /// <summary>
126
+ /// Perform an <see href="https://ipfs.io/docs/api/">IPFS API command</see> returning a string.
127
+ /// </summary>
128
+ /// <param name="command">
129
+ /// The <see href="https://ipfs.io/docs/api/">IPFS API command</see>, such as
130
+ /// <see href="https://ipfs.io/docs/api/#apiv0filels">"file/ls"</see>.
131
+ /// </param>
132
+ /// <param name="arg">
133
+ /// The optional argument to the command.
134
+ /// </param>
135
+ /// <param name="options">
136
+ /// The optional flags to the command.
137
+ /// </param>
138
+ /// <returns>
139
+ /// A string representation of the command's result.
140
+ /// </returns>
141
+ public string DoCommand ( string command , string arg = null , params string [ ] options )
126
142
{
127
143
try
128
144
{
@@ -140,13 +156,54 @@ protected internal string DoCommand(string command, string arg = null, params st
140
156
}
141
157
}
142
158
143
- protected internal T DoCommand < T > ( string command , string arg = null , params string [ ] options )
159
+ /// <summary>
160
+ /// Perform an <see href="https://ipfs.io/docs/api/">IPFS API command</see> returning
161
+ /// a specific <see cref="Type"/>.
162
+ /// </summary>
163
+ /// <typeparam name="T">
164
+ /// The <see cref="Type"/> of object to return.
165
+ /// </typeparam>
166
+ /// <param name="command">
167
+ /// The <see href="https://ipfs.io/docs/api/">IPFS API command</see>, such as
168
+ /// <see href="https://ipfs.io/docs/api/#apiv0filels">"file/ls"</see>.
169
+ /// </param>
170
+ /// <param name="arg">
171
+ /// The optional argument to the command.
172
+ /// </param>
173
+ /// <param name="options">
174
+ /// The optional flags to the command.
175
+ /// </param>
176
+ /// <returns>
177
+ /// A <typeparamref name="T"/>.
178
+ /// </returns>
179
+ /// <remarks>
180
+ /// The command's response is converted to <typeparamref name="T"/> using
181
+ /// <c>JsonConvert</c>.
182
+ /// </remarks>
183
+ public T DoCommand < T > ( string command , string arg = null , params string [ ] options )
144
184
{
145
185
var json = DoCommand ( command , arg , options ) ;
146
186
return JsonConvert . DeserializeObject < T > ( json ) ;
147
187
}
148
188
149
- protected internal Stream Download ( string command , string arg = null , params string [ ] options )
189
+ /// <summary>
190
+ /// Perform an <see href="https://ipfs.io/docs/api/">IPFS API command</see> returning a
191
+ /// <see cref="Stream"/>.
192
+ /// </summary>
193
+ /// <param name="command">
194
+ /// The <see href="https://ipfs.io/docs/api/">IPFS API command</see>, such as
195
+ /// <see href="https://ipfs.io/docs/api/#apiv0filels">"file/ls"</see>.
196
+ /// </param>
197
+ /// <param name="arg">
198
+ /// The optional argument to the command.
199
+ /// </param>
200
+ /// <param name="options">
201
+ /// The optional flags to the command.
202
+ /// </param>
203
+ /// <returns>
204
+ /// A <see cref="Stream"/> containing the command's result.
205
+ /// </returns>
206
+ public Stream Download ( string command , string arg = null , params string [ ] options )
150
207
{
151
208
try
152
209
{
0 commit comments