Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Commit

Permalink
General cleanup. Killed Node class, django stuff, canvas and other us…
Browse files Browse the repository at this point in the history
…eless stuff.
  • Loading branch information
hjrnunes committed Mar 28, 2012
1 parent 2452ada commit 941ea33
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 815 deletions.
5 changes: 2 additions & 3 deletions REQUIREMENTS
@@ -1,3 +1,2 @@
bunch>=1.0.0
simplejson>=2.1.1
urlobject>=0.5
bunch>=1.0.1
simplejson>=2.4.0
2 changes: 0 additions & 2 deletions setup.py
Expand Up @@ -8,7 +8,6 @@
from distribute_setup import use_setuptools; use_setuptools()
from setuptools import setup, find_packages


rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
cleanup = lambda lines: filter(None, map(lambda s: s.strip(), lines))

Expand All @@ -33,7 +32,6 @@ def get_extra_requirements():
extras_require[group] = cleanup(read_from(req_filename).splitlines())
return extras_require


setup(
name = 'pyfacegraph',
version = get_version(),
Expand Down
4 changes: 1 addition & 3 deletions src/facegraph/__init__.py
Expand Up @@ -2,10 +2,8 @@

__version__ = '0.0.32'

from facegraph.canvas import decode_signed_request
from facegraph.api import Api
from facegraph.api import ApiException
from facegraph.fql import FQL
from facegraph.graph import Graph
from facegraph.graph import GraphException
from facegraph.signature import InvalidSignature
from facegraph.graph import GraphException
15 changes: 6 additions & 9 deletions src/facegraph/api.py
@@ -1,6 +1,3 @@
#from eventlet.green import urllib2
#from eventlet.green import httplib

import socket
import simplejson
from urllib import urlencode, unquote
Expand Down Expand Up @@ -46,26 +43,26 @@ def __method(self):
return u".".join(self.stack)

def __getitem__(self, name):
'''
"""
This method returns a new FB and allows us to chain attributes, e.g. fb.stream.publish
A stack of attributes is maintained so that we can call the correct method later
'''
"""
s = []
s.extend(self.stack)
s.append(name)
return self.__class__(stack=s, access_token=self.access_token, cookie=self.cookie, err_handler=self.err_handler,
timeout=self.timeout, retries=self.retries, urllib2=self.urllib2, httplib=self.httplib)

def __getattr__(self, name):
'''
"""
We trigger __getitem__ here so that both self.method.name and self['method']['name'] work
'''
"""
return self[name]

def __call__(self, _retries=None, *args, **kwargs):
'''
"""
Executes an old REST api method using the stored method stack
'''
"""
_retries = _retries or self.retries

if len(self.stack)>0:
Expand Down
47 changes: 0 additions & 47 deletions src/facegraph/canvas.py

This file was deleted.

Empty file removed src/facegraph/django/__init__.py
Empty file.
103 changes: 0 additions & 103 deletions src/facegraph/django/middleware.py

This file was deleted.

154 changes: 0 additions & 154 deletions src/facegraph/django/views.py

This file was deleted.

0 comments on commit 941ea33

Please sign in to comment.