Skip to content

Commit

Permalink
added get s3 space
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Oct 18, 2023
1 parent 6988c7d commit 4c4aad0
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions compress/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
import requests
import requests, json
#
from builtins import isinstance
from typing import Dict, List
#
Expand All @@ -31,12 +32,33 @@ class CompressClient:
#
api_key: str
customer_name: str
client_id : str
req : requests
#
def __init__(self, api_key :str , customer_name : str):
self.api_key = api_key
self.customer_name = customer_name
self.req = requests.Session()
self.client_id = customer_name + "_client"
#

#/**
# *
# * @param {string} apikey
# * @param {string} customer
# * @returns in data {
# "total": 4608,
# "used": 1965
# }
# */
get_s3_space() {
return self.req.post(TNGRM_BASE_URL + S3_SPACE,
headers={
"Content-Type": "application/json",
},
body= json.dumps({
api_key: self.api_key,
client_id: self.client_id,
}),
)
}
#

0 comments on commit 4c4aad0

Please sign in to comment.