@@ -122,23 +122,23 @@ you just create a ``Blob`` inside your bucket
122122and store your data inside the blob::
123123
124124 >>> blob = bucket.new_blob('greeting.txt')
125- >>> blob.set_contents_from_string ('Hello world!')
125+ >>> blob.upload_from_string ('Hello world!')
126126
127127:func: `new_blob <gcloud.storage.bucket.Bucket.new_blob> `
128128creates a :class: `Blob <gcloud.storage.blob.Blob> ` object locally
129129and
130- :func: `set_contents_from_string <gcloud.storage.blob.Blob.set_contents_from_string > `
130+ :func: `upload_from_string <gcloud.storage.blob.Blob.upload_from_string > `
131131allows you to put a string into the blob.
132132
133133Now we can test if it worked::
134134
135135 >>> blob = bucket.get_blob('greeting.txt')
136- >>> print blob.get_contents_as_string ()
136+ >>> print blob.download_as_string ()
137137 Hello world!
138138
139139What if you want to save the contents to a file?
140140
141- >>> blob.get_contents_to_filename (' greetings.txt' )
141+ >>> blob.download_to_file (' greetings.txt' )
142142
143143Then you can look at the file in a terminal::
144144
@@ -149,12 +149,12 @@ And what about when you're not dealing with text?
149149That's pretty simple too::
150150
151151 >>> blob = bucket.new_blob('kitten.jpg')
152- >>> blob.set_contents_from_filename ('kitten.jpg')
152+ >>> blob.upload_from_filename ('kitten.jpg')
153153
154154And to test whether it worked?
155155
156156 >>> blob = bucket.get_blob(' kitten.jpg' )
157- >>> blob.get_contents_to_filename (' kitten2.jpg' )
157+ >>> blob.download_to_file (' kitten2.jpg' )
158158
159159and check if they are the same in a terminal::
160160
0 commit comments