Method: Aspose::Cloud::Slides::Extractor#get_shapes
- Defined in:
- lib/Slides/extractor.rb
#get_shapes(slide_number, storage_type = '', storage_name = '', folder_name = '') ⇒ Object
Gets all shapes from the specified slide @param number slide_number
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/Slides/extractor.rb', line 62 def get_shapes(,storage_type = '',storage_name='',folder_name='') begin if @filename == '' raise 'No file name specified' end str_uri = $product_uri + '/slides/' + @filename + '/slides/' + .to_s + '/shapes' if !folder_name.empty? str_uri += '?folder=' + folder_name end if !storage_name.empty? str_uri += '&storage=' + storage_name end signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri) response = RestClient.get(signed_uri, :accept => 'application/json') json = JSON.parse(response) shapes = Hash.new json['ShapeList']['ShapesLinks'].each { |item| signed_uri = Aspose::Cloud::Common::Utils.sign(item['Uri']['Href']) response = RestClient.get(signed_uri, :accept => 'application/json') shapes = JSON.parse(response) } return shapes rescue Exception=>e print e end end |