class PynstagramClient(object): def __init__(self, username, password, proxy=None): self._session = PynstagramSession(proxy) self._session.login(username, password) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): pass def upload(self, path, caption=''): media_id = self._session.upload_photo(path) self._session.configure_photo(media_id, caption)
class PynstagramClient(object): def __init__(self, username, password): self._session = PynstagramSession() self._session.login(username, password) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): pass def upload(self, path, caption=''): media_id = self._session.upload_photo(path) self._session.configure_photo(media_id, caption)
def __init__(self, username, password, proxies): self._session = PynstagramSession() self._userlogin = self._session.login(username, password, proxies)
def __init__(self, username, password, proxy=None): self._session = PynstagramSession(proxy) self._session.login(username, password)
def __init__(self, username, password): self._session = PynstagramSession() self._session.login(username, password)
def __init__(self, username, password ,proxies): self._session = PynstagramSession() self._userlogin = self._session.login(username, password, proxies)