-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Phone Number Lookup API * Update api_tests.py * Update api_tests.py * Update api_tests.py * Create phone_number_lookup_basic_auth.py * Update bandwidth_client.py * Fix config and update test * Update api_tests.py * Revert Test changes * Update test to include GET method * copy/paste error * typo fix * Update README.md * Changes based on updated spec * Update api_tests.py * bump version
- Loading branch information
1 parent
aa09863
commit d54facd
Showing
20 changed files
with
1,179 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
.DS_Store |
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
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,30 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
bandwidth | ||
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). | ||
""" | ||
|
||
import base64 | ||
|
||
|
||
class PhoneNumberLookupBasicAuth: | ||
|
||
@staticmethod | ||
def apply(config, http_request): | ||
""" Add basic authentication to the request. | ||
Args: | ||
config (Configuration): The Configuration object which holds the | ||
authentication information. | ||
http_request (HttpRequest): The HttpRequest object to which | ||
authentication will be added. | ||
""" | ||
username = config.phone_number_lookup_basic_auth_user_name | ||
password = config.phone_number_lookup_basic_auth_password | ||
joined = "{}:{}".format(username, password) | ||
encoded = base64.b64encode(str.encode(joined)).decode('iso-8859-1') | ||
header_value = "Basic {}".format(encoded) | ||
http_request.headers["Authorization"] = header_value |
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,6 @@ | ||
__all__ = [ | ||
'controllers', | ||
'exceptions', | ||
'models', | ||
'phone_number_lookup_client', | ||
] |
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,4 @@ | ||
__all__ = [ | ||
'base_controller', | ||
'api_controller', | ||
] |
Oops, something went wrong.