Example #1
0
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)
Example #2
0
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)
Example #3
0
 def __init__(self, username, password, proxies):
     self._session = PynstagramSession()
     self._userlogin = self._session.login(username, password, proxies)
Example #4
0
 def __init__(self, username, password, proxy=None):
     self._session = PynstagramSession(proxy)
     self._session.login(username, password)
Example #5
0
 def __init__(self, username, password):
     self._session = PynstagramSession()
     self._session.login(username, password)
Example #6
0
	def __init__(self, username, password ,proxies):
		self._session = PynstagramSession()
		self._userlogin = self._session.login(username, password, proxies)