commit | author | age
|
3eceb5
|
1 |
// |
W |
2 |
// VKApiDocs.h |
|
3 |
// |
|
4 |
// Copyright (c) 2014 VK.com |
|
5 |
// |
|
6 |
// Permission is hereby granted, free of charge, to any person obtaining a copy of |
|
7 |
// this software and associated documentation files (the "Software"), to deal in |
|
8 |
// the Software without restriction, including without limitation the rights to |
|
9 |
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
|
10 |
// the Software, and to permit persons to whom the Software is furnished to do so, |
|
11 |
// subject to the following conditions: |
|
12 |
// |
|
13 |
// The above copyright notice and this permission notice shall be included in all |
|
14 |
// copies or substantial portions of the Software. |
|
15 |
// |
|
16 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
17 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
18 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
19 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
20 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
21 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
22 |
|
|
23 |
#import "VKApiBase.h" |
|
24 |
|
|
25 |
/** |
|
26 |
Builds requests for API.docs part |
|
27 |
*/ |
|
28 |
@interface VKApiDocs : VKApiBase |
|
29 |
|
|
30 |
/** |
|
31 |
* Returns detailed information about user or community documents. |
|
32 |
* https://vk.com/dev/docs.get |
|
33 |
* |
|
34 |
* @return Request to load |
|
35 |
*/ |
|
36 |
- (VKRequest *)get; |
|
37 |
|
|
38 |
/** |
|
39 |
* Returns detailed information about user or community documents. |
|
40 |
* https://vk.com/dev/docs.get |
|
41 |
* |
|
42 |
* @param count Number of documents to return. |
|
43 |
* |
|
44 |
* @return Request to load |
|
45 |
*/ |
|
46 |
- (VKRequest *)get:(NSInteger)count; |
|
47 |
|
|
48 |
/** |
|
49 |
* Returns detailed information about user or community documents. |
|
50 |
* https://vk.com/dev/docs.get |
|
51 |
* |
|
52 |
* @param count Number of documents to return. By default, all documents. |
|
53 |
* @param offset Offset needed to return a specific subset of documents. |
|
54 |
* |
|
55 |
* @return Request to load |
|
56 |
*/ |
|
57 |
- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset; |
|
58 |
|
|
59 |
/** |
|
60 |
* Returns detailed information about user or community documents. |
|
61 |
* https://vk.com/dev/docs.get |
|
62 |
* |
|
63 |
* @param count Number of documents to return. By default, all documents. |
|
64 |
* @param offset Offset needed to return a specific subset of documents. |
|
65 |
* @param ownerID ID of the user or community that owns the documents. Use a negative value to designate a community ID. |
|
66 |
* |
|
67 |
* @return Request to load |
|
68 |
*/ |
|
69 |
- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset andOwnerID:(NSInteger)ownerID; |
|
70 |
|
|
71 |
/** |
|
72 |
* Returns information about documents by their IDs. |
|
73 |
* https://vk.com/dev/docs.getById |
|
74 |
* @param IDs Document IDs. |
|
75 |
* |
|
76 |
* @return Request to load |
|
77 |
*/ |
|
78 |
- (VKRequest *)getByID:(NSArray *)IDs; |
|
79 |
|
|
80 |
/** |
|
81 |
* Returns the server address for document upload. |
|
82 |
* https://vk.com/dev/docs.getUploadServer |
|
83 |
* |
|
84 |
* @return Request to load |
|
85 |
*/ |
|
86 |
- (VKRequest *)getUploadServer; |
|
87 |
|
|
88 |
/** |
|
89 |
* Returns the server address for document upload. |
|
90 |
* https://vk.com/dev/docs.getUploadServer |
|
91 |
* |
|
92 |
* @param group_id ID of the community the document will be uploaded to. |
|
93 |
* |
|
94 |
* @return Request to load |
|
95 |
*/ |
|
96 |
- (VKRequest *)getUploadServer:(NSInteger)group_id; |
|
97 |
|
|
98 |
/** |
|
99 |
* Returns the server address for document upload onto a user's or community's wall. |
|
100 |
* https://vk.com/dev/docs.getWallUploadServer |
|
101 |
* |
|
102 |
* @return Request to load |
|
103 |
*/ |
|
104 |
- (VKRequest *)getWallUploadServer; |
|
105 |
|
|
106 |
/** |
|
107 |
* Returns the server address for document upload onto a user's or community's wall. |
|
108 |
* https://vk.com/dev/docs.getWallUploadServer |
|
109 |
* |
|
110 |
* @param group_id ID of the community the document will be uploaded to. |
|
111 |
* |
|
112 |
* @return Request to load |
|
113 |
*/ |
|
114 |
- (VKRequest *)getWallUploadServer:(NSInteger)group_id; |
|
115 |
|
|
116 |
/** |
|
117 |
* Saves a document after uploading it to a server. |
|
118 |
* https://vk.com/dev/docs.save |
|
119 |
* |
|
120 |
* @param file This parameter is returned when the file is uploaded to the server. |
|
121 |
* |
|
122 |
* @return Request to load |
|
123 |
*/ |
|
124 |
- (VKRequest *)save:(NSString *)file; |
|
125 |
|
|
126 |
/** |
|
127 |
* Saves a document after uploading it to a server. |
|
128 |
* https://vk.com/dev/docs.save |
|
129 |
* |
|
130 |
* @param file This parameter is returned when the file is uploaded to the server. |
|
131 |
* @param title Document title. |
|
132 |
* |
|
133 |
* @return Request to load |
|
134 |
*/ |
|
135 |
- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title; |
|
136 |
|
|
137 |
/** |
|
138 |
* Saves a document after uploading it to a server. |
|
139 |
* https://vk.com/dev/docs.save |
|
140 |
* |
|
141 |
* @param file This parameter is returned when the file is uploaded to the server. |
|
142 |
* @param title Document title |
|
143 |
* @param tags Document tags |
|
144 |
* |
|
145 |
* @return Request to load |
|
146 |
*/ |
|
147 |
- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title andTags:(NSString *)tags; |
|
148 |
|
|
149 |
/** |
|
150 |
* Deletes a user or community document. |
|
151 |
* https://vk.com/dev/docs.delete |
|
152 |
* |
|
153 |
* @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. |
|
154 |
* @param docID Document ID. |
|
155 |
* |
|
156 |
* @return Request to load |
|
157 |
*/ |
|
158 |
- (VKRequest *)delete:(NSInteger)ownerID andDocID:(NSInteger)docID; |
|
159 |
|
|
160 |
/** |
|
161 |
* Copies a document to a user's or community's document list. |
|
162 |
* https://vk.com/dev/docs.add |
|
163 |
* |
|
164 |
* @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. |
|
165 |
* @param docID Document ID. |
|
166 |
* |
|
167 |
* @return Request to load |
|
168 |
*/ |
|
169 |
- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID; |
|
170 |
|
|
171 |
/** |
|
172 |
* Copies a document to a user's or community's document list. |
|
173 |
* https://vk.com/dev/docs.add |
|
174 |
* |
|
175 |
* @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. |
|
176 |
* @param docID Document ID. |
|
177 |
* @param accessKey Access key. This parameter is required if access_key was returned with the document's data. |
|
178 |
* |
|
179 |
* @return Request to load |
|
180 |
*/ |
|
181 |
- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID andAccessKey:(NSString *)accessKey; |
|
182 |
|
|
183 |
/** |
|
184 |
* Returns results of search |
|
185 |
* https://vk.com/dev/docs.search |
|
186 |
* |
|
187 |
* @param query Search query |
|
188 |
* |
|
189 |
* @return Request to load |
|
190 |
*/ |
|
191 |
- (VKRequest *)search:(NSString *)query; |
|
192 |
|
|
193 |
/** |
|
194 |
* Returns results of search |
|
195 |
* https://vk.com/dev/docs.search |
|
196 |
* |
|
197 |
* @param query Search query |
|
198 |
* @param count Number of documents to return. |
|
199 |
* |
|
200 |
* @return Request to load |
|
201 |
*/ |
|
202 |
- (VKRequest *)search:(NSString *)query count:(NSInteger)count; |
|
203 |
|
|
204 |
/** |
|
205 |
* Returns results of search |
|
206 |
* https://vk.com/dev/docs.search |
|
207 |
* |
|
208 |
* @param query Search query |
|
209 |
* @param count Number of documents to return. |
|
210 |
* @param offset Offset needed to return a specific subset of documents. |
|
211 |
* |
|
212 |
* @return Request to load |
|
213 |
*/ |
|
214 |
- (VKRequest *)search:(NSString *)query count:(NSInteger)count andOffset:(NSInteger)offset; |
|
215 |
|
|
216 |
/** |
|
217 |
* Edits a current user's document. |
|
218 |
* https://vk.com/dev/docs.edit |
|
219 |
* |
|
220 |
* @param docID Document ID. |
|
221 |
* @param title New document title |
|
222 |
* |
|
223 |
* @return Request to load |
|
224 |
*/ |
|
225 |
- (VKRequest *)edit:(NSInteger)docID title:(NSString *)title; |
|
226 |
|
|
227 |
/** |
|
228 |
* Edits a current user's document. |
|
229 |
* https://vk.com/dev/docs.edit |
|
230 |
* |
|
231 |
* @param docID Document ID. |
|
232 |
* @param title New document title |
|
233 |
* @param tags New document tags |
|
234 |
* |
|
235 |
* @return Request to load |
|
236 |
*/ |
|
237 |
- (VKRequest *)edit:(NSInteger)docID title:(NSString *)title tags:(NSString *)tags; |
|
238 |
|
|
239 |
/** |
|
240 |
* Edits a user's or community's document. |
|
241 |
* https://vk.com/dev/docs.edit |
|
242 |
* |
|
243 |
* @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. |
|
244 |
* @param docID Document ID. |
|
245 |
* @param title New document title |
|
246 |
* |
|
247 |
* @return Request to load |
|
248 |
*/ |
|
249 |
- (VKRequest *)edit:(NSInteger)ownerID docID:(NSInteger)docID title:(NSString *)title; |
|
250 |
|
|
251 |
/** |
|
252 |
* Edits a user's or community's document. |
|
253 |
* https://vk.com/dev/docs.edit |
|
254 |
* |
|
255 |
* @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. |
|
256 |
* @param docID Document ID. |
|
257 |
* @param title New document title |
|
258 |
* @param tags New document tags |
|
259 |
* |
|
260 |
* @return Request to load |
|
261 |
*/ |
|
262 |
- (VKRequest *)edit:(NSInteger)ownerID docID:(NSInteger)docID title:(NSString *)title tags:(NSString *)tags; |
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
@end |