nsarchive 0.0.7a0__py3-none-any.whl → 0.0.8a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nsarchive/__init__.py CHANGED
@@ -58,7 +58,7 @@ class EntityInstance:
58
58
  if type(entity) == Organization:
59
59
  _data['owner_id'] = entity.owner.id.upper() if entity.owner else "0"
60
60
  _data['members'] = [ member.id.upper() for member in entity.members ] if entity.members else []
61
- _data['certifications'] = entity.certifications
61
+ _data['certifications'] = entity.certifications
62
62
  elif type(entity) == User:
63
63
  _data['boosts'] = entity.boosts
64
64
 
@@ -89,21 +89,22 @@ class EntityInstance:
89
89
 
90
90
  if listquery is not None:
91
91
  for item in _res:
92
- for target, value in listquery:
92
+ for target, value in listquery.items():
93
93
  if value not in item[target]:
94
94
  _res.remove(item)
95
95
 
96
96
  return _res
97
97
 
98
- def get_entity_groups(self, id: int) -> list[Organization]:
99
- groups = self.fetch({'_type': 'organization'}, {'members': str(id)})
98
+ def get_entity_groups(self, id: str) -> list[Organization]:
99
+ groups = self.fetch({'_type': 'organization'}, {'members': id})
100
100
 
101
- return [ self.get_entity(int(group['id'], 16)) for group in groups ]
101
+ return [ self.get_entity(group['key']) for group in groups ]
102
102
 
103
103
  class RepublicInstance:
104
104
  def __init__(self, token: str) -> None:
105
105
  self.db = deta.Deta(token)
106
106
  self.votes = self.db.Base('votes')
107
+ self.archives = self.db.Base('archives')
107
108
 
108
109
  def get_vote(self, id: str) -> Vote | ClosedVote:
109
110
  id = id.upper()
@@ -0,0 +1,8 @@
1
+ class Action:
2
+ def __init__(self, author: str = '11625D9061021010', target: str = '123') -> None:
3
+ self.author: str = author
4
+ self.target: str = target
5
+
6
+ class Sanction(Action):
7
+ def __init__(self, author: str, target: str) -> None:
8
+ super().__init__(author, target)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsarchive
3
- Version: 0.0.7a0
3
+ Version: 0.0.8a0
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: happex
@@ -0,0 +1,10 @@
1
+ nsarchive/__init__.py,sha256=VQPxaG4KMatlSWZa8A_UbYmnBVIdMuqrsGFsvrIcmE4,5538
2
+ nsarchive/cls/archives.py,sha256=RroqiA85YCCbj48IYDqX4PBYKxnT43jL9NWlqxSlllc,299
3
+ nsarchive/cls/bank.py,sha256=OactEpRn8PGv7BwnBUbMpzgHqrvv4yx526AMzh9uBO8,220
4
+ nsarchive/cls/entities.py,sha256=mhBHZBtYK1E2dfTDoFHNdw1uu5QsnOc-Utuu5EjtV7c,2556
5
+ nsarchive/cls/exceptions.py,sha256=TrH9PvHhVZi7wap9ZfBLGRWJY3OBCYgWAMnco5uadYY,420
6
+ nsarchive/cls/votes.py,sha256=qaWVgfhk5GBccilFSwoZ0E9qE--IX_3HuOBoQAHD2jA,502
7
+ nsarchive-0.0.8a0.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
8
+ nsarchive-0.0.8a0.dist-info/METADATA,sha256=J3sYVVCdRQLp1jxP3Ak2kfxoNbQ-sDBYPQcvWH7bB0c,5554
9
+ nsarchive-0.0.8a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
10
+ nsarchive-0.0.8a0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- nsarchive/__init__.py,sha256=3zNWlcKF5Cs5ZCgVY_i4RbHdbMTDVWRlZa_8JtlrqFU,5492
2
- nsarchive/cls/bank.py,sha256=OactEpRn8PGv7BwnBUbMpzgHqrvv4yx526AMzh9uBO8,220
3
- nsarchive/cls/entities.py,sha256=mhBHZBtYK1E2dfTDoFHNdw1uu5QsnOc-Utuu5EjtV7c,2556
4
- nsarchive/cls/exceptions.py,sha256=TrH9PvHhVZi7wap9ZfBLGRWJY3OBCYgWAMnco5uadYY,420
5
- nsarchive/cls/votes.py,sha256=qaWVgfhk5GBccilFSwoZ0E9qE--IX_3HuOBoQAHD2jA,502
6
- nsarchive-0.0.7a0.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
7
- nsarchive-0.0.7a0.dist-info/METADATA,sha256=NAWRyMMcf3NkeYj9eSSmF_E52Goabm8ruXA8fr_N2sU,5554
8
- nsarchive-0.0.7a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
9
- nsarchive-0.0.7a0.dist-info/RECORD,,