Previous topic

Modules

Next topic

circuit

This Page

caps

class pyogp.lib.base.caps.Capability(name, public_url, restclient=None, settings=None)

models a capability A capability is a web resource which enables functionality for a client The seed capability is a special type, through which other capabilities are procured

A capability in pyogp provides a GET and a POST method

Sample implementations: region.py Tests: tests/caps.txt, tests/test_caps.py

initialize the capability

GET(custom_headers={})
call this capability, return the parsed result
POST(payload, custom_headers={})
call this capability, return the parsed result
POST_FILE(file_name, custom_headers={})
Opens file at file_name and posts contents to this cap.
class pyogp.lib.base.caps.SeedCapability(name, public_url, restclient=None, settings=None)

a seed capability which is able to retrieve other capabilities

initialize the capability

GET(custom_headers={})
call this capability, return the parsed result
POST(payload, custom_headers={})
call this capability, return the parsed result
POST_FILE(file_name, custom_headers={})
Opens file at file_name and posts contents to this cap.
get(names=[])

if this is a seed cap we can retrieve other caps here

Note: changing post key from ‘caps’ to ‘capabilities’ for OGP spec updates in Draft 3 see http://wiki.secondlife.com/wiki/OGP_Base_Draft_3#Seed_Capability_.28Resource_Class.29