From 8a6d514696107e0944310286edab18ccd064c312 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 1 Apr 2013 17:30:18 +0300 Subject: Added Content(), fetch_image() --- gsxws.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gsxws.py') diff --git a/gsxws.py b/gsxws.py index 64a3c47..2a1c490 100755 --- a/gsxws.py +++ b/gsxws.py @@ -204,6 +204,16 @@ class GsxObject(object): return rd +class Content(GsxObject): + def fetch_image(self, url): + ''' + The Fetch Image API allows users to get the image file from GSX, + for the content articles, using the image URL. + The image URLs will be obtained from the image html tags in the data from all content APIs. + ''' + dt = self._make_type('ns3:fetchImageRequestType') + dt.imageRequest = {'imageUrl': url} + return self.submit('FetchImage', dt, 'contentResponse') class CompTIA(object): ''' -- cgit v1.2.3