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

Public Member Functions

def __init__ (self, apiKey, host='https://pixabay.com/api/')
 Init function. More...
 
def query (self, query='', lang='en', orientation='all', perPage=50, order="popular", safeSearch=False, minWidth=0, minHeight=0, editorsChoice=False, category='all', colors='all', image_type='all')
 Make search qvery on API. More...
 
def image (self, iid)
 Get image by ID. More...
 

Public Attributes

 apiKey
 
 host
 

Detailed Description

Definition at line 12 of file core.py.

Constructor & Destructor Documentation

◆ __init__()

def pixabay.core.core.__init__ (   self,
  apiKey,
  host = 'https://pixabay.com/api/' 
)

Init function.

Parameters
apiKeyapi key for pixabay API
hosthost of api (default: https://pixabay.com/api/)
Returns
core obj

Definition at line 18 of file core.py.

Member Function Documentation

◆ image()

def pixabay.core.core.image (   self,
  iid 
)

Get image by ID.

Parameters
iidimage id
Returns
image object

Definition at line 66 of file core.py.

◆ query()

def pixabay.core.core.query (   self,
  query = '',
  lang = 'en',
  orientation = 'all',
  perPage = 50,
  order = "popular",
  safeSearch = False,
  minWidth = 0,
  minHeight = 0,
  editorsChoice = False,
  category = 'all',
  colors = 'all',
  image_type = 'all' 
)

Make search qvery on API.

Parameters
querysearch words (ex: big tree)
langlanguage of search words (default "en") supported: cs, da, de, en, es, fr, id, it, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, vi, th, bg, ru, el, ja, ko, zh
orientationorientation of image (default "all") supported: all, horizontal, vertical
perPagenumber of images per one request (default: 25)
orderorder of images (default: "popular") supported: popular, latest
safeSearcha flag indicating that only images suitable for all ages should be returned (Default: False)
minWidthmin width of image (default: 0)
minHeightmin height of image (default: 0)
editorsChoiceimages that have received an Editor's Choice award (Default: False)
categoryfilter images by category (default: "all") supported: all, backgrounds, fashion, nature, science, education, feelings, health, people, religion, places, animals, industry, computer, food, sports, transportation, travel, buildings, business, music
colorsfilter images by color properties. A comma separated list of values may be used to select multiple properties. (Default: "all") supported: all, grayscale, transparent, red, orange, yellow, green, turquoise, blue, lilac, pink, white, gray, black, brown
Returns
query object

Definition at line 42 of file core.py.


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