dropbox.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. const defaults = require('./constants')
  2. module.exports.responses = {
  3. 'users/get_current_account': {
  4. post: {
  5. name: {
  6. given_name: 'Franz',
  7. surname: 'Ferdinand',
  8. familiar_name: 'Franz',
  9. display_name: 'Franz Ferdinand (Personal)',
  10. abbreviated_name: 'FF',
  11. },
  12. email: defaults.USERNAME,
  13. email_verified: true,
  14. disabled: false,
  15. locale: 'en',
  16. referral_link: 'https://db.tt/ZITNuhtI',
  17. is_paired: true,
  18. },
  19. },
  20. 'files/list_folder': {
  21. post: {
  22. entries: [
  23. {
  24. '.tag': 'file',
  25. name: defaults.ITEM_NAME,
  26. id: defaults.ITEM_ID,
  27. client_modified: '2015-05-12T15:50:38Z',
  28. server_modified: '2015-05-12T15:50:38Z',
  29. rev: 'a1c10ce0dd78',
  30. size: defaults.FILE_SIZE,
  31. path_lower: '/homework/math/prime_numbers.txt',
  32. path_display: '/Homework/math/Prime_Numbers.txt',
  33. is_downloadable: true,
  34. has_explicit_shared_members: false,
  35. content_hash: 'e3b0c44298fc1c149afbf41e4649b934ca49',
  36. file_lock_info: {
  37. is_lockholder: true,
  38. lockholder_name: 'Imaginary User',
  39. created: '2015-05-12T15:50:38Z',
  40. },
  41. },
  42. ],
  43. cursor: 'ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu',
  44. has_more: false,
  45. },
  46. },
  47. 'files/get_metadata': {
  48. post: {
  49. size: defaults.FILE_SIZE,
  50. },
  51. },
  52. 'auth/token/revoke': {
  53. post: {},
  54. },
  55. 'https://content.dropboxapi.com/2/files/download': {
  56. post: {},
  57. },
  58. }
  59. module.exports.expects = {
  60. itemIcon: 'file',
  61. itemRequestPath: '%2Fhomework%2Fmath%2Fprime_numbers.txt',
  62. }