Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created December 18, 2010 17:25
Show Gist options
  • Save dtinth/746676 to your computer and use it in GitHub Desktop.
Save dtinth/746676 to your computer and use it in GitHub Desktop.
>>> from pizza import pizza
>>> print ''.join([ '- ' + crust['name'] + '\n' for crust in pizza.pizza.getAllCrustType('EN') ])
- Thirty Bites Pizza(Promotion)
- Thirty Bites Pizza
- Pan Pizza
- Thin Crispy
- Cheesy Max
- Extreme Pizza
- Extra Cheesy Sausage Bites
- X-Pan
- Pizza Puff
#!/usr/bin/python2.6
from pyamf.remoting.client import RemotingService
class Pizza:
def __init__(self):
self.gateway = RemotingService('http://www.pizza.co.th/amfphp/gateway.php')
self.gateway.addHTTPHeader ('Referer', 'http://www.pizza.co.th/site.swf');
self.services = {}
def __getattr__(self, name):
if not name in self.services:
self.services[name] = self.gateway.getService(name + 'Service')
return self.services[name]
pizza = Pizza()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment