Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Documentation

Kasoki edited this page Jan 11, 2012 · 11 revisions

Documentation

ATTENTION: Not up to date!

Better documentation coming soon....

Usage

provider.js

booru_handler = BooruPy("provider.js")
provider = booru_handler.get_provider_by_id(0)
tag = "tag"
images = provider.get_images(provider.get_request_url(tag))
for i in images:
    print(i.url)

List of all methods and properties

BooruPy(Class):
	methods:
		constructor:
			provider_list # path to the provider list (json)
		get_provider_by_id:
			provider_id # provider id
		get_provider_by_key:
			provider_key # provider key
	properties:
		provider_list

DanbooruProvider (class):
	methods:
		constructor:
			provider_entry # part of the provider list (json)
		get_request_url:
			tags
			limit # maximum images
			page
		get_json:
			request_url
		get_images: # Return list of Image items
			request_url
	properties:
		key
		name
		url
		type # danbooru, gelbooru
		query

GelbooruProvider (class):
	methods:
		constructor:
			provider_entry # part of the provider list (json)
		get_request_url:
			tags
			limit # maximum images
			page
		get_xml:
			request_url
		get_images: # Return list of Image items
			request_url
	properties:
		key
		name
		url
		type # danbooru, gelbooru
		query

Image (class):
	methods:
		constructor:
			image # json part for each image
	properties:
		url
		width
		height
		rating
		score
		md5
		preview_url
		preview_width
		preview_height
		sample_url
		sample_width
		sample_height
		tags
Clone this wiki locally