1 <html><body> 2 <style> 3 4 body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13 } 14 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51 } 52 53 .toc_element { 54 margin-top: 0.5em; 55 } 56 57 .firstline { 58 margin-left: 2 em; 59 } 60 61 .method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66 } 67 68 .details { 69 font-weight: bold; 70 font-size: 14px; 71 } 72 73 </style> 74 75 <h1><a href="plusDomains_v1.html">Google+ Domains API</a> . <a href="plusDomains_v1.media.html">media</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#insert">insert(userId, collection, body=None, media_body=None, media_mime_type=None)</a></code></p> 79 <p class="firstline">Add a new media item to an album. The current upload size limitations are 36MB for a photo and 1GB for a video. Uploads do not count against quota if photos are less than 2048 pixels on their longest side or videos are less than 15 minutes in length.</p> 80 <h3>Method Details</h3> 81 <div class="method"> 82 <code class="details" id="insert">insert(userId, collection, body=None, media_body=None, media_mime_type=None)</code> 83 <pre>Add a new media item to an album. The current upload size limitations are 36MB for a photo and 1GB for a video. Uploads do not count against quota if photos are less than 2048 pixels on their longest side or videos are less than 15 minutes in length. 84 85 Args: 86 userId: string, The ID of the user to create the activity on behalf of. (required) 87 collection: string, A parameter (required) 88 Allowed values 89 cloud - Upload the media to share on Google+. 90 body: object, The request body. 91 The object takes the form of: 92 93 { 94 "kind": "plus#media", # The type of resource. 95 "displayName": "A String", # The display name for this media. 96 "exif": { # Exif information of the media item. 97 "time": "A String", # The time the media was captured. Formatted as an RFC 3339 timestamp. 98 }, 99 "author": { # The person who uploaded this media. 100 "url": "A String", # A link to the author's Google profile. 101 "image": { # The author's Google profile image. 102 "url": "A String", # The URL of the author's profile photo. To resize the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side. 103 }, 104 "displayName": "A String", # The author's name. 105 "id": "A String", # ID of the author. 106 }, 107 "url": "A String", # The URL for the page that hosts this media. 108 "mediaUrl": "A String", # The URL of this photo or video's still image. 109 "videoStatus": "A String", # The encoding status of this video. Possible values are: 110 # - "UPLOADING" - Not all the video bytes have been received. 111 # - "PENDING" - Video not yet processed. 112 # - "FAILED" - Video processing failed. 113 # - "READY" - A single video stream is playable. 114 # - "FINAL" - All video streams are playable. 115 "updated": "A String", # The time at which this media was last updated. This includes changes to media metadata. Formatted as an RFC 3339 timestamp. 116 "summary": "A String", # A description, or caption, for this media. 117 "height": 42, # The height in pixels of the original image. 118 "videoDuration": "A String", # The duration in milliseconds of this video. 119 "sizeBytes": "A String", # The size in bytes of this video. 120 "etag": "A String", # ETag of this response for caching purposes. 121 "streams": [ # The list of video streams for this video. There might be several different streams available for a single video, either Flash or MPEG, of various sizes 122 { 123 "url": "A String", # URL of the video stream. 124 "width": 42, # The width, in pixels, of the video resource. 125 "type": "A String", # MIME type of the video stream. 126 "height": 42, # The height, in pixels, of the video resource. 127 }, 128 ], 129 "width": 42, # The width in pixels of the original image. 130 "published": "A String", # The time at which this media was uploaded. Formatted as an RFC 3339 timestamp. 131 "mediaCreatedTime": "A String", # The time at which this media was originally created in UTC. Formatted as an RFC 3339 timestamp that matches this example: 2010-11-25T14:30:27.655Z 132 "id": "A String", # ID of this media, which is generated by the API. 133 } 134 135 media_body: string, The filename of the media request body, or an instance of a MediaUpload object. 136 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. 137 138 Returns: 139 An object of the form: 140 141 { 142 "kind": "plus#media", # The type of resource. 143 "displayName": "A String", # The display name for this media. 144 "exif": { # Exif information of the media item. 145 "time": "A String", # The time the media was captured. Formatted as an RFC 3339 timestamp. 146 }, 147 "author": { # The person who uploaded this media. 148 "url": "A String", # A link to the author's Google profile. 149 "image": { # The author's Google profile image. 150 "url": "A String", # The URL of the author's profile photo. To resize the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side. 151 }, 152 "displayName": "A String", # The author's name. 153 "id": "A String", # ID of the author. 154 }, 155 "url": "A String", # The URL for the page that hosts this media. 156 "mediaUrl": "A String", # The URL of this photo or video's still image. 157 "videoStatus": "A String", # The encoding status of this video. Possible values are: 158 # - "UPLOADING" - Not all the video bytes have been received. 159 # - "PENDING" - Video not yet processed. 160 # - "FAILED" - Video processing failed. 161 # - "READY" - A single video stream is playable. 162 # - "FINAL" - All video streams are playable. 163 "updated": "A String", # The time at which this media was last updated. This includes changes to media metadata. Formatted as an RFC 3339 timestamp. 164 "summary": "A String", # A description, or caption, for this media. 165 "height": 42, # The height in pixels of the original image. 166 "videoDuration": "A String", # The duration in milliseconds of this video. 167 "sizeBytes": "A String", # The size in bytes of this video. 168 "etag": "A String", # ETag of this response for caching purposes. 169 "streams": [ # The list of video streams for this video. There might be several different streams available for a single video, either Flash or MPEG, of various sizes 170 { 171 "url": "A String", # URL of the video stream. 172 "width": 42, # The width, in pixels, of the video resource. 173 "type": "A String", # MIME type of the video stream. 174 "height": 42, # The height, in pixels, of the video resource. 175 }, 176 ], 177 "width": 42, # The width in pixels of the original image. 178 "published": "A String", # The time at which this media was uploaded. Formatted as an RFC 3339 timestamp. 179 "mediaCreatedTime": "A String", # The time at which this media was originally created in UTC. Formatted as an RFC 3339 timestamp that matches this example: 2010-11-25T14:30:27.655Z 180 "id": "A String", # ID of this media, which is generated by the API. 181 }</pre> 182 </div> 183 184 </body></html>