Skip to content

Commit

Permalink
Added remaining processors
Browse files Browse the repository at this point in the history
  • Loading branch information
sweemer committed Sep 20, 2011
1 parent e4b1d35 commit 0809493
Show file tree
Hide file tree
Showing 4 changed files with 448 additions and 67 deletions.
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ v0.0.2, 09/19/2011 -- Added init file.

v0.0.3, 09/19/2011 -- Updated module info.

v0.0.4, 09/19/2011 -- Moved processors to a separate package, and added the Session processors
v0.0.4, 09/19/2011 -- Moved processors to a separate package, and added the Session processors.

v0.0.5, 09/19/2011 -- Updated setup.py to include processors module.

v0.0.6, 09/20/2011 -- Added remaining processors.
12 changes: 9 additions & 3 deletions pamfax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from httplib import HTTPSConnection
from urllib import urlencode

from processors import FaxJob, Session
from processors import Common, FaxHistory, FaxJob, NumberInfo, OnlineStorage, Session, Shopping, UserInfo

import types

Expand All @@ -36,9 +36,15 @@ def __init__(self, username, password, base_uri='api.pamfax.biz', api_key='', ap
session = Session(api_credentials, http)
user_token = self.get_user_token(session, username, password)
api_credentials = '%s&%s' % (api_credentials, urlencode({'usertoken': user_token}))
faxjob = FaxJob(api_credentials, http)
common = Common(api_credentials, http)
fax_history = FaxHistory(api_credentials, http)
fax_job = FaxJob(api_credentials, http)
number_info = NumberInfo(api_credentials, http)
online_storage = OnlineStorage(api_credentials, http)
shopping = Shopping(api_credentials, http)
user_info = UserInfo(api_credentials, http)
attrs = dir(self)
for processor in (session, faxjob):
for processor in (session, common, fax_history, fax_job, number_info, online_storage, shopping, user_info):
for attr_key in dir(processor):
if attr_key not in attrs:
attr_value = getattr(processor, attr_key)
Expand Down
Loading

0 comments on commit 0809493

Please sign in to comment.