-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created sdist and bdist for PyPi to deploy on pip
- Loading branch information
Showing
64 changed files
with
2,909 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from .models.exception import * | ||
|
||
from .utils import (string_to_timestamp, get_phone_model_from_json, random_device_id, deserialize, wrap_callback, | ||
warn, confirm) | ||
from .utils.api_client import ApiClient | ||
|
||
from .models.json_schema import JSONSchema | ||
from .models.user import User | ||
from .models.transaction import Transaction | ||
from .models.payment_method import PaymentMethod, PaymentRole, PaymentPrivacy | ||
|
||
from .apis.auth_api import AuthenticationApi | ||
from .apis.payment_api import PaymentApi | ||
from .apis.user_api import UserApi | ||
|
||
from .venmo_api import Client |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
models/payment_method.py → build/lib/venmo/models/payment_method.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
models/transaction.py → build/lib/venmo/models/transaction.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from venmo_api.venmo import Client | ||
|
||
venmoash = Client("Bearer a40feeb268f13825bcca7b79130a7711352854b52633bda5e16349656b06367d") | ||
|
||
users = venmoash.user.search_for_users('mamali') | ||
for user in users: | ||
print(user) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from venmo_api import ApiClient, UserApi, PaymentApi, AuthenticationApi | ||
|
||
|
||
class Client(object): | ||
|
||
def __init__(self, access_token: str): | ||
""" | ||
VenmoAPI Client | ||
:param access_token: <str> Need access_token to work with the API. | ||
""" | ||
super().__init__() | ||
self.__access_token = access_token | ||
self.__api_client = ApiClient(access_token=access_token) | ||
self.user = UserApi(self.__api_client) | ||
self.payment = PaymentApi(self.__api_client) | ||
|
||
@staticmethod | ||
def get_access_token(username: str, password: str, device_id: str = None) -> str: | ||
""" | ||
Log in using your credentials and get an access_token to use in the API | ||
:param username: <str> Can be username, phone number (without +1) or email address. | ||
:param password: <str> Account's password | ||
:param device_id: <str> [optional] A valid device-id. | ||
:return: <str> access_token | ||
""" | ||
authn_api = AuthenticationApi(api_client=ApiClient(), device_id=device_id) | ||
return authn_api.login_using_credentials(username=username, password=password) | ||
|
||
@staticmethod | ||
def log_out(access_token) -> bool: | ||
""" | ||
Revoke your access_token. Log out, in other words. | ||
:param access_token: | ||
:return: <bool> | ||
""" | ||
return AuthenticationApi.log_out(access_token=access_token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from .models.exception import * | ||
|
||
from .utils import (string_to_timestamp, get_phone_model_from_json, random_device_id, deserialize, wrap_callback, | ||
warn, confirm) | ||
from .utils.api_client import ApiClient | ||
|
||
from .models.json_schema import JSONSchema | ||
from .models.user import User | ||
from .models.transaction import Transaction | ||
from .models.payment_method import PaymentMethod, PaymentRole, PaymentPrivacy | ||
|
||
from .apis.auth_api import AuthenticationApi | ||
from .apis.payment_api import PaymentApi | ||
from .apis.user_api import UserApi | ||
|
||
from .venmo import Client | ||
|
||
|
||
__all__ = ["AuthenticationFailedError", "InvalidArgumentError", "InvalidHttpMethodError", "ArgumentMissingError", | ||
"JSONDecodeError", "ResourceNotFoundError", "HttpCodeError", "NoPaymentMethodFoundError", | ||
"string_to_timestamp", "get_phone_model_from_json", "random_device_id", "deserialize", "wrap_callback", | ||
"warn", "confirm", | ||
"JSONSchema", "User", "Transaction", "PaymentMethod", "PaymentRole", "PaymentPrivacy", | ||
"ApiClient", "AuthenticationApi", "UserApi", "PaymentApi", | ||
"Client" | ||
] |
Empty file.
Oops, something went wrong.