Skip to content

Commit 06d0215

Browse files
authored
Add files.upload v2 support (#1065)
1 parent 612d9a7 commit 06d0215

27 files changed

+1727
-344
lines changed

json-logs/samples/api/chat.postMessage.json

Lines changed: 209 additions & 270 deletions
Large diffs are not rendered by default.

json-logs/samples/api/conversations.history.json

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,247 @@
301301
}
302302
],
303303
"comments_count": 12345
304+
},
305+
{
306+
"id": "F00000000",
307+
"created": 12345,
308+
"timestamp": 12345,
309+
"name": "",
310+
"title": "",
311+
"mimetype": "",
312+
"filetype": "",
313+
"pretty_type": "",
314+
"user": "U00000000",
315+
"user_team": "T00000000",
316+
"editable": false,
317+
"size": 12345,
318+
"mode": "",
319+
"is_external": false,
320+
"external_type": "",
321+
"is_public": false,
322+
"public_url_shared": false,
323+
"display_as_bot": false,
324+
"username": "",
325+
"url_private": "https://www.example.com/",
326+
"url_private_download": "https://www.example.com/",
327+
"media_display_type": "",
328+
"thumb_64": "https://www.example.com/",
329+
"thumb_80": "https://www.example.com/",
330+
"thumb_360": "https://www.example.com/",
331+
"thumb_360_w": 12345,
332+
"thumb_360_h": 12345,
333+
"thumb_160": "https://www.example.com/",
334+
"original_w": 12345,
335+
"original_h": 12345,
336+
"thumb_tiny": "",
337+
"permalink": "https://www.example.com/",
338+
"permalink_public": "https://www.example.com/",
339+
"alt_txt": "",
340+
"is_starred": false,
341+
"has_rich_preview": false,
342+
"file_access": "",
343+
"subject": "",
344+
"non_owner_editable": false,
345+
"editor": "",
346+
"last_editor": "",
347+
"updated": 12345,
348+
"subtype": "",
349+
"transcription": {
350+
"status": "",
351+
"locale": ""
352+
},
353+
"mp4": "",
354+
"vtt": "",
355+
"hls": "",
356+
"hls_embed": "",
357+
"duration_ms": 12345,
358+
"thumb_video_w": 12345,
359+
"thumb_video_h": 12345,
360+
"original_attachment_count": 12345,
361+
"external_id": "",
362+
"external_url": "",
363+
"app_id": "",
364+
"app_name": "",
365+
"thumb_64_gif": "",
366+
"thumb_64_w": "",
367+
"thumb_64_h": "",
368+
"thumb_80_gif": "",
369+
"thumb_80_w": "",
370+
"thumb_80_h": "",
371+
"thumb_160_gif": "",
372+
"thumb_160_w": "",
373+
"thumb_160_h": "",
374+
"thumb_360_gif": "",
375+
"thumb_480": "",
376+
"thumb_480_gif": "",
377+
"thumb_480_w": "",
378+
"thumb_480_h": "",
379+
"thumb_720": "",
380+
"thumb_720_gif": "",
381+
"thumb_720_w": "",
382+
"thumb_720_h": "",
383+
"thumb_800": "",
384+
"thumb_800_gif": "",
385+
"thumb_800_w": "",
386+
"thumb_800_h": "",
387+
"thumb_960": "",
388+
"thumb_960_gif": "",
389+
"thumb_960_w": "",
390+
"thumb_960_h": "",
391+
"thumb_1024": "",
392+
"thumb_1024_gif": "",
393+
"thumb_1024_w": "",
394+
"thumb_1024_h": "",
395+
"thumb_video": "",
396+
"thumb_gif": "",
397+
"thumb_pdf": "",
398+
"thumb_pdf_w": "",
399+
"thumb_pdf_h": "",
400+
"converted_pdf": "",
401+
"image_exif_rotation": 12345,
402+
"deanimate": "",
403+
"deanimate_gif": "",
404+
"pjpeg": "",
405+
"edit_link": "",
406+
"preview_is_truncated": false,
407+
"preview": "",
408+
"preview_highlight": "",
409+
"plain_text": "",
410+
"preview_plain_text": "",
411+
"has_more": false,
412+
"sent_to_self": false,
413+
"lines": 12345,
414+
"lines_more": 12345,
415+
"channels": [
416+
""
417+
],
418+
"groups": [
419+
""
420+
],
421+
"ims": [
422+
""
423+
],
424+
"shares": {
425+
"public": {
426+
"C00000000": [
427+
{
428+
"share_user_id": "",
429+
"reply_users": [
430+
""
431+
],
432+
"reply_users_count": 12345,
433+
"reply_count": 12345,
434+
"ts": "",
435+
"thread_ts": "",
436+
"latest_reply": "",
437+
"channel_name": "",
438+
"team_id": ""
439+
}
440+
],
441+
"C00000001": [
442+
{
443+
"share_user_id": "",
444+
"reply_users": [
445+
""
446+
],
447+
"reply_users_count": 12345,
448+
"reply_count": 12345,
449+
"ts": "",
450+
"thread_ts": "",
451+
"latest_reply": "",
452+
"channel_name": "",
453+
"team_id": ""
454+
}
455+
]
456+
},
457+
"private": {
458+
"C00000000": [
459+
{
460+
"share_user_id": "",
461+
"reply_users": [
462+
""
463+
],
464+
"reply_users_count": 12345,
465+
"reply_count": 12345,
466+
"ts": "",
467+
"thread_ts": "",
468+
"latest_reply": "",
469+
"channel_name": "",
470+
"team_id": ""
471+
}
472+
],
473+
"C00000001": [
474+
{
475+
"share_user_id": "",
476+
"reply_users": [
477+
""
478+
],
479+
"reply_users_count": 12345,
480+
"reply_count": 12345,
481+
"ts": "",
482+
"thread_ts": "",
483+
"latest_reply": "",
484+
"channel_name": "",
485+
"team_id": ""
486+
}
487+
]
488+
}
489+
},
490+
"to": [
491+
{
492+
"address": "",
493+
"name": "",
494+
"original": ""
495+
}
496+
],
497+
"from": [
498+
{
499+
"address": "",
500+
"name": "",
501+
"original": ""
502+
}
503+
],
504+
"cc": [
505+
{
506+
"address": "",
507+
"name": "",
508+
"original": ""
509+
}
510+
],
511+
"channel_actions_ts": "",
512+
"channel_actions_count": 12345,
513+
"headers": {
514+
"date": "",
515+
"in_reply_to": "",
516+
"reply_to": "",
517+
"message_id": ""
518+
},
519+
"simplified_html": "",
520+
"bot_id": "",
521+
"initial_comment": {
522+
"id": "",
523+
"created": 12345,
524+
"timestamp": 12345,
525+
"user": "",
526+
"comment": "",
527+
"channel": "",
528+
"is_intro": false
529+
},
530+
"num_stars": 12345,
531+
"pinned_to": [
532+
""
533+
],
534+
"reactions": [
535+
{
536+
"name": "",
537+
"count": 12345,
538+
"users": [
539+
""
540+
],
541+
"url": ""
542+
}
543+
],
544+
"comments_count": 12345
304545
}
305546
],
306547
"upload": false,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ok": false,
3+
"files": [
4+
{
5+
"id": "F00000000",
6+
"title": ""
7+
}
8+
],
9+
"error": "",
10+
"needed": "",
11+
"provided": ""
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"ok": false,
3+
"error": "",
4+
"needed": "",
5+
"provided": "",
6+
"upload_url": "https://www.example.com/",
7+
"file_id": "F00000000",
8+
"response_metadata": {
9+
"messages": [
10+
""
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)