Skip to content

Commit

Permalink
script structure in-progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Prescott committed Oct 20, 2023
1 parent 65aeca5 commit 6a2ae5e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions odin_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os

from odin_api.utils.exceptions import *
from odin_api.store.data_store import Store
from odin_api.store.data_store import DataStore
from odin_api.scripter import Scripter


class Api:
Expand All @@ -20,8 +21,9 @@ def __init__(self, base_url, username, password) -> None:
self.password = os.getenv(password, default=None)
self.authorised = False
self.token = ""
self.scripter = Scripter()

Store.get_instance().apis.append(self)
DataStore.get_instance().apis.append(self)

# SESSION
def authenticate(self) -> None:
Expand Down
6 changes: 5 additions & 1 deletion odin_api/scripts.py → odin_api/scripter.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# user will use this module as an entry to oa_scripts for example:
# odin_aip.scripts.find_alias('foo') will call the relevant script in oa_scipts = oa_scripts.find_alias('foo')
# odin_aip.scripts.find_alias('foo') will call the relevant script in oa_scipts = oa_scripts.find_alias('foo')

class Scripter:
def __init__(self) -> None:
pass
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6a2ae5e

Please sign in to comment.