diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-11-09 16:18:23 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-11-09 16:18:23 -0500 |
| commit | 0b72a27ead9d1e933ae349b8a3e9e9b8702664d1 (patch) | |
| tree | 326f75721a1894a04e40e3bfc9f77d7433bb1c25 /src/server/apis/google/GooglePhotosUploadUtils.ts | |
| parent | c53d599f8ecffe173d8df06777721658f065674a (diff) | |
factored out all but google resources into managers
Diffstat (limited to 'src/server/apis/google/GooglePhotosUploadUtils.ts')
| -rw-r--r-- | src/server/apis/google/GooglePhotosUploadUtils.ts | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/server/apis/google/GooglePhotosUploadUtils.ts b/src/server/apis/google/GooglePhotosUploadUtils.ts index d8cf795b5..0abed3f1d 100644 --- a/src/server/apis/google/GooglePhotosUploadUtils.ts +++ b/src/server/apis/google/GooglePhotosUploadUtils.ts @@ -1,7 +1,6 @@ import request = require('request-promise'); import * as path from 'path'; -import { MediaItemCreationResult, NewMediaItemResult } from './SharedTypes'; -import { NewMediaItem } from "../../index"; +import { NewMediaItemResult } from './SharedTypes'; import { BatchedArray, TimeUnit } from 'array-batcher'; import { DashUploadUtils } from '../../DashUploadUtils'; @@ -29,6 +28,22 @@ export namespace GooglePhotosUploadUtils { } /** + * This is the format needed to pass + * into the BatchCreate API request + * to take a reference to raw uploaded bytes + * and actually create an image in Google Photos. + * + * So, to instantiate this interface you must have already dispatched an upload + * and received an upload token. + */ + export interface NewMediaItem { + description: string; + simpleMediaItem: { + uploadToken: string; + }; + } + + /** * A utility function to streamline making * calls to the API's url - accentuates * the relative path in the caller. |
