def profileEmail(self, api_url): self.vals = { 'auth_member_id' : self.auth_member_id, 'auth_token' : self.auth_token, 'action' : self.action, 'email' : self.email, } manager = Manager(self.vals) manager.request(api_url, "session/profile")
def avatar(self, api_url): self.vals = { 'auth_member_id' : self.auth_member_id, 'auth_token' : self.auth_token, 'action' : self.action, 'url' : self.url } manager = Manager(self.vals) manager.request(api_url, "session/avatar")
def count(self, api_url): self.vals = { 'auth_member_id': self.member_id, 'auth_token': self.auth_token, 'action': self.action, 'isbn': self.isbn } manager = Manager(self.vals) manager.request(api_url, "social/cnt")
def passwordNoEmail(self, api_url): self.vals = { "auth_member_id": self.member_id, "auth_token": self.auth_token, "action": self.action, "username": self.username, "current_password": self.current_password, "password": self.new_password } manager = Manager(self.vals) manager.request(api_url, "session/password")
def password(self, api_url): self.vals = { "auth_member_id": self.member_id, "auth_token": self.auth_token, "action": self.action, "current_password": self.current_password, "password": self.new_password, "email": self.email } if self.username != None: self.vals["username"] = self.username manager = Manager(self.vals) manager.request(api_url, "session/password")
def address(self, api_url): self.vals = { 'auth_member_id': self.auth_member_id, 'auth_token': self.auth_token, 'action': self.action, 'type': self.objType, 'id': self.id, 'country_numeric_iso_3166_1': self.country_iso, 'order_id': self.order_id, 'name': self.name, 'address1': self.address1, 'address2': self.address2, 'city': self.city, 'state': self.state, 'zip': self.zip, 'country_alpha2': self.country_alpha2, 'label': self.label, 'card_name': self.card_name, 'card_type': self.card_type, 'card_exp_month': self.card_exp_month, 'card_exp_year': self.card_exp_year, 'card_cvv': self.card_cvv, 'card_number': self.card_number } manager = Manager(self.vals) return manager.request(api_url, "ecomm/address")
def list(self, api_url): self.vals = { 'auth_member_id': self.auth_member_id, 'auth_token': self.auth_token, 'action': self.action } manager = Manager(self.vals) return manager.request(api_url, "collection/lists")
def token(self, api_url): self.vals = { 'auth_member_id': self.member_id, 'auth_token': self.auth_token, 'action': self.action } manager = Manager(self.vals) return manager.request(api_url, "session/token")
def account(self, api_url): self.vals = { 'auth_member_id': self.memberId, 'auth_token': self.authToken, 'action': self.action, 'email': self.email, 'password': self.password, 'first_name': self.member_first_name, 'last_name': self.member_last_name, 'bday_d': self.bday_d, 'bday_m': self.bday_m, 'bday_y': self.bday_y, 'device_name': self.device_name, 'gender': self.member_gender } manager = Manager(self.vals) manager.request(api_url, "session/account")
def curation(self, api_url): self.vals = {'action': self.action} if self.isbn != None: self.vals['isbn'] = self.isbn if self.member_id != None: self.vals['member_id'] = self.member_id manager = Manager(self.vals) return manager.request(api_url, "collection/curation")
def find(self, api_url): self.vals = { 'action': self.action, 'query': self.query, 'limit': self.limit, 'offset': self.offset } manager = Manager(self.vals) return manager.request(api_url, "search/find")
def download(self, api_url): self.vals = { 'auth_member_id': self.auth_member_id, 'auth_token': self.auth_token, 'action': self.action, 'isbn': self.isbn, 'type': self.type, 'web': self.web } manager = Manager(self.vals) return manager.request(api_url, "ecomm/download")
def bounty(self, api_url): if self.member_id == None and self.auth_token == None: self.vals = {'action': self.action, 'isbn': self.isbn} else: self.vals = { 'auth_member_id': self.member_id, 'auth_token': self.auth_token, 'action': self.action, 'isbn': self.isbn } manager = Manager(self.vals) return manager.request(api_url, "ecomm/bounty")
def rec(self, api_url): self.vals = { 'action': self.action, 'isbn': self.isbn, 'limit': self.limit, 'offset': self.offset, 'origin-override': self.override, 'preferred-format': self.format, 'restrict-format': self.restrict } manager = Manager(self.vals) return manager.request(api_url, "recommendation/rec")
def sale(self, api_url): self.vals = { 'action': self.action, 'store_uid': self.store, 'isbn': self.isbn, 'include_bundles': self.bundle_bool, 'id': self.id, 'display_formats': self.display_formats, 'contributor_id': self.contributor_id, 'limit': self.limit, 'offset': self.offset } manager = Manager(self.vals) return manager.request(api_url, "ecomm/saleable")
def commerce(self, api_url): self.vals = { 'auth_member_id': self.auth_member_id, 'auth_token': self.auth_token, 'action': self.action, 'store_uid': self.store_uid, 'order_id': self.order_id, 'item_id': self.item_id, 'qty': self.qty, 'isbn': self.isbn, 'code': self.code, 'amount': self.amount, 'session_id': self.session_id, 'carrier': self.carrier, 'email': self.email, 'opt_in': self.opt_in } if self.type != None: self.vals['type'] = self.type manager = Manager(self.vals) return manager.request(api_url, "ecomm/commerce")
def isLogged(self, api_url): manager = Manager(self.vals) manager.request(api_url, "session/is_logged_in")
def ping(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "session/ping")
def purchase(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "collection/purchase")
def activate(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "social/activity")
def profile(self, api_url): if self.action == "set": self.vals = { 'auth_member_id' : self.auth_member_id, 'auth_token' : self.auth_token, 'action' : self.action, 'email' : self.email, 'bday_d' : self.bday_d, 'bday_m' : self.bday_m, 'bday_y' : self.bday_y, 'receive_newsletter' : self.receive_newsletter, 'receive_email_if_followed' : self.receive_email_if_followed, 'receive_email_if_messaged' : self.receive_email_if_messaged, 'first_name' : self.member_first_name, 'last_name' : self.member_last_name, 'facebook_username' : self.member_facebook_username, 'twitter_username' : self.member_twitter_username, 'gender' : self.member_gender, 'zip_code' : self.member_zip_code, 'location' : self.member_location, 'public_email' : self.member_public_email, 'website' : self.member_website, 'twitter_url' : self.member_twitter_url, 'facebook_url' : self.member_facebook_url, 'phone' : self.member_phone, 'gplus_url' : self.member_gplus_url, 'facebook_id' : self.member_facebook_id, 'gplus_username' : self.member_gplus_username, 'rss_feed' : self.member_rss_feed } if self.member_id != None: self.vals['member_id'] = self.member_id else: self.vals = { 'auth_member_id' : self.auth_member_id, 'auth_token' : self.auth_token, 'action' : self.action, 'email' : self.email, 'bday_d' : self.bday_d, 'bday_m' : self.bday_m, 'bday_y' : self.bday_y, 'receive_newsletter' : self.receive_newsletter, 'receive_email_if_followed': self.receive_email_if_followed, 'receive_email_if_messaged': self.receive_email_if_messaged, 'first_name' : self.member_first_name, 'last_name' : self.member_last_name, 'facebook_username' : self.member_facebook_username, 'twitter_username' : self.member_twitter_username, 'gender' : self.member_gender, 'zip_code' : self.member_zip_code, 'location' : self.member_location, 'public_email' : self.member_public_email, 'website' : self.member_website, 'twitter_url' : self.member_twitter_url, 'facebook_url' : self.member_facebook_url, 'phone' : self.member_phone, 'gplus_url' : self.member_gplus_url, 'facebook_id' : self.member_facebook_id, 'gplus_username' : self.member_gplus_username, 'rss_feed' : self.member_rss_feed } if self.member_id != None: self.vals['member_id'] = self.member_id manager = Manager(self.vals) manager.request(api_url, "session/profile")
def article(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "content/article")
def list(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "collection/lists")
def rss(self, api_url): self.vals = {} manager = Manager(self.vals) return manager.request(api_url, "content/rss")
def follow(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "social/follow")
def review(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "content/review")
def details(self, api_url): manager = Manager(self.vals) manager.request(api_url, "metadata/details")
def details(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "book/details")
def login(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "session/login")
def member(self, api_url): manager = Manager(self.vals) return manager.request(api_url, "social/member")