python-pixabay
Public Member Functions | List of all members
pixabay.image.image Class Reference

Public Member Functions

def __init__ (self, data)
 Init image object. More...
 
def getId (self)
 Get ID of image.
 
def getPageURL (self)
 Get page url of image.
 
def getType (self)
 Get type of image.
 
def getTags (self)
 Get tags of image.
 
def getPreviewURL (self)
 Get url of Preview.
 
def getPreviewWidth (self)
 Get width of Preview.
 
def getPreviewHeight (self)
 Get Height of Preview.
 
def getWebformatURL (self)
 Get webformat URL.
 
def getWebformatWidth (self)
 Get width of webformat.
 
def getWebformatHeight (self)
 Get height of webformat.
 
def getLargeImageURL (self)
 Get large Image URL.
 
def getImageWidth (self)
 Get width of image.
 
def getImageHeight (self)
 Get height of image.
 
def getImageSize (self)
 Get size of image.
 
def getViews (self)
 Get views of image.
 
def getDownloads (self)
 Get downloads of image.
 
def getCollections (self)
 Get collections of image.
 
def getLikes (self)
 Get likes of image.
 
def getComments (self)
 Get comments of image.
 
def getUserId (self)
 Get author id of image.
 
def getUser (self)
 Get name of author of image.
 
def getUserImageURL (self)
 Get url of image of author of image.
 
def downloadRaw (self, imtype='webformat')
 Download image to varaible. More...
 
def download (self, dst, imtype='webformat')
 Download image to file. More...
 
def getPublishedDate (self)
 Get published date of image. More...
 

Detailed Description

Definition at line 10 of file image.py.

Constructor & Destructor Documentation

◆ __init__()

def pixabay.image.image.__init__ (   self,
  data 
)

Init image object.

Parameters
datadata of image in JSON format
Returns
image obj

Definition at line 15 of file image.py.

Member Function Documentation

◆ download()

def pixabay.image.image.download (   self,
  dst,
  imtype = 'webformat' 
)

Download image to file.

Parameters
dstlocation of file to save
imtypetype if image (webformat, preview, largeImage) (Default: webformat)

Definition at line 156 of file image.py.

◆ downloadRaw()

def pixabay.image.image.downloadRaw (   self,
  imtype = 'webformat' 
)

Download image to varaible.

Parameters
imtypetype if image (webformat, preview, largeImage) (Default: webformat)
Returns
byte array of image

Definition at line 132 of file image.py.

◆ getPublishedDate()

def pixabay.image.image.getPublishedDate (   self)

Get published date of image.

Returns
datetime UTC of image publication

Definition at line 162 of file image.py.


The documentation for this class was generated from the following file: