Skip to content

Commit

Permalink
Create sidra_chain_service.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 20, 2024
1 parent 74b0296 commit e51d4dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sidra_chain_integration/sidra_chain_service.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# sidra_chain_service.py
from sidra_chain_api import SidraChainAPI

class SidraChainService:
def __init__(self, api_key, api_secret):
self.sidra_chain_api = SidraChainAPI(api_key, api_secret)

def get_chain_data(self):
access_token = self.sidra_chain_api.authenticate()
if access_token:
return self.sidra_chain_api.get_chain_data(access_token)
else:
return None

0 comments on commit e51d4dd

Please sign in to comment.