@@ -6,10 +6,13 @@ class ImageUploadExample(SpontitResource):
66
77 def dirty_channel_profile_image_upload (self , image_path , is_png , channel_name = None ):
88 """
9- This function explicitly constructs the bytes sent to the server in order to upload a channel profile image.
9+ # WARNING: Don't use this method if you are using Python. It will work, but there is a far more intuitive method
10+ # in the SpontitResource. Just use spontit_resource.channel_profile_image_upload(...) and feel free to examine
11+ # the example in examples.py titled 'create_new_channel_with_profile_image_and_push_to_it'.
1012
11- The explicit construction of the multi-part request should make it somewhat easier to develop such a request
12- in another language.
13+ # This example illustrates how to construct the byte payload for other languages (i.e. not fully dependent on
14+ # the requests library). The explicit construction of the multi-part request should make it somewhat easier to
15+ # develop such a request in another language.
1316
1417 :param image_path: the path to the image
1518 :param is_png: whether or not the image is PNG or JPEG
@@ -69,6 +72,13 @@ def dirty_channel_profile_image_upload(self, image_path, is_png, channel_name=No
6972
7073if __name__ == "__main__" :
7174
75+ # WARNING: Don't use this method if you are using Python. It will work, but there is a far more intuitive method
76+ # in the SpontitResource. Just use spontit_resource.channel_profile_image_upload(...) and feel free to examine
77+ # the example in examples.py titled 'create_new_channel_with_profile_image_and_push_to_it'.
78+
79+ # This example illustrates how to construct the byte payload for other languages (i.e. not fully dependent on the
80+ # requests library).
81+
7282 img_upload_resource = ImageUploadExample (
7383 "my_user_id" ,
7484 "my_secret_key"
0 commit comments