Skip to content

Commit

Permalink
Merge branch 'pr/77' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMi460 committed May 26, 2023
2 parents ff50a37 + 28b8c36 commit 45e0bed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ def get(self):
return json.loads(response.text)

class imink():
def __init__(self, id_token, timestamp, guid, iteration):
def __init__(self, na_id, id_token, timestamp, guid, iteration):
self.headers = {
'User-Agent': 'NSO-RPC/%s' % version,
'Content-Type': 'application/json; charset=utf-8',
}
self.body = {
'token': id_token,
'hashMethod': str(iteration),
'hash_method': str(iteration),
'na_id': na_id,
}

self.url = 'https://api.imink.app'
Expand Down Expand Up @@ -250,8 +251,9 @@ def __init__(self, userInfo, userLang, accessToken, guid):

self.userInfo = userInfo
self.accessToken = accessToken
self.na_id = userInfo['id']

self.imink = imink(self.accessToken, self.timestamp, self.guid, 1).get()
self.imink = imink(self.na_id, self.accessToken, self.timestamp, self.guid, 1).get()
self.timestamp = int(self.imink['timestamp'])
self.guid = self.imink['request_id']

Expand Down

0 comments on commit 45e0bed

Please sign in to comment.