From 609c8f1384fa9ccc0b620b83ca4a186402f4d3f6 Mon Sep 17 00:00:00 2001 From: Lyncoln Date: Mon, 12 Oct 2026 11:28:07 -0400 Subject: [PATCH] Working list selection filter --- ET4 | 0 .../__pycache__/path.cpython-314.pyc | Bin 0 -> 710 bytes .../__pycache__/request.cpython-314.pyc | Bin 1133 -> 1256 bytes core/apirequest/path.py | 18 +++++ core/apirequest/request.py | 7 +- core/runtime/__init__.py | 1 + .../__pycache__/__init__.cpython-314.pyc | Bin 345 -> 411 bytes core/runtime/__pycache__/logs.cpython-314.pyc | Bin 594 -> 605 bytes .../__pycache__/outputs.cpython-314.pyc | Bin 859 -> 861 bytes .../runtimecontract.cpython-314.pyc | Bin 895 -> 1065 bytes .../__pycache__/select.cpython-314.pyc | Bin 0 -> 1497 bytes core/runtime/logs.py | 2 +- core/runtime/outputs.py | 10 ++- core/runtime/runtimecontract.py | 21 ++++-- core/runtime/select.py | 45 +++++++++++++ plugins/rmass/actions/__init__.py | 2 +- .../__pycache__/__init__.cpython-314.pyc | Bin 329 -> 350 bytes .../__pycache__/getmessage.cpython-314.pyc | Bin 0 -> 552 bytes .../pullmessagelist.cpython-314.pyc | Bin 0 -> 597 bytes plugins/rmass/actions/getmessage.py | 63 ++++++++++++++++++ plugins/rmass/actions/pullmessagelist.py | 52 +++++++++++++++ plugins/rmass/operations/__init__.py | 2 +- .../__pycache__/__init__.cpython-314.pyc | Bin 241 -> 267 bytes .../pullmessagelist.cpython-314.pyc | Bin 0 -> 368 bytes plugins/rmass/operations/pullmessagelist.py | 26 ++++++++ pullmessagelist (Copy).py | 28 ++++++++ pullmessagelist.py | 38 +++++++++++ tokens.json | 2 +- 28 files changed, 305 insertions(+), 12 deletions(-) create mode 100644 ET4 create mode 100644 core/apirequest/__pycache__/path.cpython-314.pyc create mode 100644 core/apirequest/path.py create mode 100644 core/runtime/__pycache__/select.cpython-314.pyc create mode 100644 core/runtime/select.py create mode 100644 plugins/rmass/actions/__pycache__/getmessage.cpython-314.pyc create mode 100644 plugins/rmass/actions/__pycache__/pullmessagelist.cpython-314.pyc create mode 100644 plugins/rmass/actions/getmessage.py create mode 100644 plugins/rmass/actions/pullmessagelist.py create mode 100644 plugins/rmass/operations/__pycache__/pullmessagelist.cpython-314.pyc create mode 100644 plugins/rmass/operations/pullmessagelist.py create mode 100644 pullmessagelist (Copy).py create mode 100644 pullmessagelist.py diff --git a/ET4 b/ET4 new file mode 100644 index 0000000..e69de29 diff --git a/core/apirequest/__pycache__/path.cpython-314.pyc b/core/apirequest/__pycache__/path.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f96d797530cf15546498902b2ca58558ef43b713 GIT binary patch literal 710 zcmZXSOK;Oa5XZ+}$7$n)JWC=PpjDt%lu%!KM4U)26;YLga|s6%uTqyh%-W9Hn~zZ? zr0|g7&`LeRXW>?-HSy46@UC=e;@!{`A#78 z=bA$HO;_&1FVyw}Y^yGlz!;ddEe|&m?0T8yjmV{!HELcd2UV z1Jh7hx2yN`Hf3t7�W9*{Gl9(ONjEv)#7s~pXvOdnNp5{(!=b6&5GRdxfIrwmJDt{Ay zW=kV7&OJPdd<3xW%yjL@<47H*# n@8vtN6uK;d8((_f?Hg`~zF--2=WY7$bxH(5_$4NV)I9b#K;nyo literal 0 HcmV?d00001 diff --git a/core/apirequest/__pycache__/request.cpython-314.pyc b/core/apirequest/__pycache__/request.cpython-314.pyc index d4b42c7e336a7b0d994153ae523330b6583f79da..b34ea5dc2b50c34cef97f7c45eadb3b04498b341 100644 GIT binary patch delta 705 zcmY*W&1(}u6n``OG5cYvjY^G4jgk+DmP(-@Lg_`3mV$;wHlV?hCaK*}lXWsVn}Y{$ zX5E7q4_@``e<75L2W7F~L7{>|p*?x>&9+P8gLz-``@MPd-XCM%OkJBwS%C60|FPo* zsm!w?219s69I^^4M3B7n=_*}OgpvnGnE|0XY5^+RFM`ktiR_Jmx81t8(P=jYhGraA z8)Bg5o=Om7TRj~vlhRrDzV5U7bdq;jJss|lO!$%*H}spBZk++h zL2bs-<}M~EfJy&9z8>?hJUr%N-5j{Oqfg>pHa9K=KC1~=lkKi;0+?_KYPTFUZvT7& zbLryAr1DT(2p8#6$>wq_oJpmlir7}8-w=XxIbUu_WrZV}n~yY~dtFg6BCFNj^tzt# zdfkZi2EreReq149y!~|0?hB;s&@z+ka`|%jm)=>(pf8{5@1q*RH~ZY^!Rz&4{q5t= z_Wbbnfez;M=<1hr;ZwTs)tDNoVN?0g`JtLGiqF@++v#09yQ^jokqmb$8kf5|ZZU2> v{)Bwu9dJ2begRcvEIsM92HWjrp2JXny^mXf1BDQ>2l+k79;ve=7c>3=L&<&= delta 509 zcmY+B&r1S96vyAp?5?}ordevHDYCd=2~n2_q?=I$AzQ2$>5_JcLLK$g#d{Z*IrKMl zkFIv=;K}GvSb@hbK~VRaS&?*L-kbTp&-XDuKD19&U!B#xz{k~H?=0fz(ZnL(wBZ<8 zXb*N#6D7gI5oltI7?6>i!h%x|&paRjSzto}oNg!v1uU9Ok2PGwCE0m3bkDfJd6oIl zvc}t)TrA0K9i^j$>+UJW+$a}xRz>Og{E=K!O8#-pR!RZ(i=ylvshjc^m&*ZwI26N{ zoLw4I0F&z}zwG)``H^={cx~BICV5-Q{x^b}QarIGao+t?01XmQ+_2nzF~u%%j%ZY7 zT^v!wJ*mdta2#hm43Us;;GvaztI}w4*(9b*m?k?UJ4S@VgwMtk4{aE#fzHZv(0B|Q zFY0W^d+m4ptVeF`p)c6?#rjh0n{#lGAynm=3M&;oZh(qEqhTHfYVM+1Zk<=Qsdx$g UOVH4H_#z0QcS!z7Q51LaKSK#o#sB~S diff --git a/core/apirequest/path.py b/core/apirequest/path.py new file mode 100644 index 0000000..e78cf94 --- /dev/null +++ b/core/apirequest/path.py @@ -0,0 +1,18 @@ +def buildPath(path, outputs): + if isinstance(path, str): + return path + + result = "" + + for part in path: + if isinstance(part, dict): + value = outputs[part["output"]] + + for key in part.get("keys", []): + value = value[key] + + result += str(value) + else: + result += part + + return result diff --git a/core/apirequest/request.py b/core/apirequest/request.py index 11648a6..7d1b726 100644 --- a/core/apirequest/request.py +++ b/core/apirequest/request.py @@ -1,9 +1,12 @@ from .object import buildObject +from .path import buildPath def buildRequest(definition, outputs): + path = buildPath(definition.path, outputs) + request = { "method": definition.method, - "path": definition.path, + "path": path, } if hasattr(definition, "keys"): @@ -25,4 +28,6 @@ def buildRequest(definition, outputs): request["headers"] = headers + print(path) + return request, outputs diff --git a/core/runtime/__init__.py b/core/runtime/__init__.py index 9d915dd..20db262 100644 --- a/core/runtime/__init__.py +++ b/core/runtime/__init__.py @@ -2,6 +2,7 @@ #from . import outputs #from . import managefailure #from . import savedata +from .select import buildSelect, buildSelect2 from .outputs import buildOutput from .savedata import buildSave, loadSave from .logs import buildLog diff --git a/core/runtime/__pycache__/__init__.cpython-314.pyc b/core/runtime/__pycache__/__init__.cpython-314.pyc index 92035227190a7f200f0779fb21e11ff926a3572a..744a8e0172e321d56dd822d6b3b998b805220619 100644 GIT binary patch delta 278 zcmcb~G@F@Mn~#@^0SGpRpUDcC$SYaz1>`g^#4!djdNO!0mN0rSl`zSJ_)MP69xNp+ zU^cTSs|Q;Nn+JOdJDAVn$>G6S!U<-xdUAPimvGB71hFYIXtKX#1RAKxbc;KwG&3h9 zI5j6Vx#SiP630lB5i03lT2e5v!Xl987F#h`T@f=-ZxIWSxW%3ilq@YNE@B1oIEoX? zQd1I35{uYCD%e3{EIIk<#YG$-CU0(HUSfJ`T4H8SX;Eqs=fwA}8bUw`kW-4qfW!x8 dMn=Z(TnvnQcNrA!Gicsrkb2IbQ6vDA0sy}xMPL8` delta 200 zcmbQue3OY+n~#@^0SM|3AInmj$Sdh;1>`g^#4!djdNO!0mN3eL*i4>G9?T`o9xNp+ zU_P@as|Q;N8<@@F$?m~X!XeKP#H!4o$@Y>FXu!l7uJ)X_*z-$E3Q9|giXLu z%TiMkOA?D%fZQThkQhr&etK~c8;Hr9o0ylFo|=}JnNwPnTEsqCkI_|?A1DJduUHsJ cd|+l|Wc|3m7Y`1c3aN44*-U7x4p$TO2mI`6;D2sdhyoKrSN?7xMy%56p~=jJFy1zOe8y Jau*2$MF7edE&Tuh delta 146 zcmcc1a*2gkn~#@^0SH+4oywXtk=KfmX`)A@sB#P|NDu_Vn0Oe17>t<0g(q%n&||s9 zmY7_UnV)xyJ-@W1ptPj;7FR)0W?o5rUSe+QElvnKJGHWy1*ms&KBF}w|K!z-6*Bxl i?n;KwAQOxDfW$2ho80`A(wtPgBH_vQOj0aDKtTW~ZYJvh diff --git a/core/runtime/__pycache__/outputs.cpython-314.pyc b/core/runtime/__pycache__/outputs.cpython-314.pyc index df59b739ccf58efed8675dfa04cf9aa7b1e213af..a9bdf97001ebffcca50441be3859aea493c8bd3f 100644 GIT binary patch delta 47 zcmcc3c9)G;n~#@^0SH#SIFmJJBX0{6cL$Ky!0>^GK~#3~ET)|tVvNE?qChbKH!cgR delta 45 xcmcc1cAJe?n~#@^0SHzdIF-e|k++43vkk~=V0a)RGkFfvP7WbP;UZC>2mlT-3dsNf diff --git a/core/runtime/__pycache__/runtimecontract.cpython-314.pyc b/core/runtime/__pycache__/runtimecontract.cpython-314.pyc index b3c6ef1faa37ac911c6343c85906337c00c2f501..0a08fb6a7a3af6382d3076120a263652c31c90cd 100644 GIT binary patch delta 538 zcmYjNJ8Tm{5S`ikCU!1Sl*Cc^*b$MPj}%bi0zrf*03E3;C$bv^x!4!Qk>j)W_JA^F z3JOl!&?S`VXsKu@Y4{0gg+u`bbQJDDf*qfbc*WDa*?BWh`^P?Wy%le46f~}Ve{=B4 zO1;_IqE<(6AL@7)d=%(2!F)p)z9~%K5>^rFtN_BU8<$|o{6Xd=OXYTxPPe@kcEgrX z`TxXPx^)%1>64xLae(u1&mse%iB*2QrH|6V%jxe~G}4p8^^xq2<{GT3CkRDo zKy8>e)Bm_`ZbEyR_BU89FGDPj>1!FZV?w4lUAER(6|-Iunv?5H=eLy;C8D2*SlRI~ zynK!G=SGyXAH;zWoKs$I64^wK{DsS_rm};U=tMnEF_p{1xF7Z6Q01~E588nUVse$s z<&wP3Hm7E^pk48)rXv_kf;%psvzd$E9Pjwy)5o8j(mSX0xw8J^&il%(x9-Am?pbr- z$(O8Roi2WGSL9cAbI(!vR>Z?qp7ccLFy!|*~3~+VW delta 423 zcmZ3<@t=)Pn~#@^0SH14oXT=$naC%hs{rIRFvKwgF?uq1FqSZSFqJTQFqbgPGXyb- zGnB9dF)K4@vb+Ro(qx`kX2Ga6aecyMe?~S&*2!Uvij!>_mGl`+m_YIj4Dt+N3;`Sv zHZmE+?8T6x#lRrL5XKb1HTe{yyaO*x9;ky4#zxRQ3_&bLOeTyF5qXAiA!8<>Ls)OI z=a-fgl$I1vHe^y1>u`AvYlAV#Uf&H?O zMF;yAfyv>_>daR-6el+`JH)Ww;z`agO4TbW%`3^wO+~gFXigEx)RhcH!XUOFkhsNR olbfGXnv-f*BnISy{8TIeBt9@RGBVz0u)N4%`GrNAQ5LKN0BICb-~a#s diff --git a/core/runtime/__pycache__/select.cpython-314.pyc b/core/runtime/__pycache__/select.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8b3120b4b9f2f46de62eef0ba07d6194ccf8034f GIT binary patch literal 1497 zcmah}-*4Mg6h4lfIH?<&rcSbT=?|%Ensn)cV4xx~1VT)L&=CdXR2ma9vFWnqhjs02 zEz%@EraTexknsX}1PP@61AF6KHoh)*Y`WQ z_C|CD(Eb?zegA0?;5h}JF_Yjdj)4hfNPz)m20c>_tU->gvK|#z4u2G%9icNpf|9o% zv1d0XfyNd<<0PgO@G{f2gne8zZ(j^vv~KFMI}Yu?LC+>J>$ zEASPk@x^t32rR=cUx~lX;#rv6InL(p>#e38($%_JHSA!`P#d}()JUyqZ%=*t40l(e5-9}Z9})CUg{e~He_3HE4YB8Ww2ONQTOeLo59U`7<7 z^>(^DKYd~DjKdHY&7zfB>OJm0ewNxiNo|f&`9q<@S?Sy`T{sF3)9-eKlknw#!qLuy zL3nXI1BuliA}{9Q($-jn*~E|E9SiHn-1-@ohpPX+=sh_%{ujRAgzKOMDzOr!U9d9v z@5Uc%Eb8O}o5C`4j>Wx(6*$KVzJ|q~V}&FZRkRPF@e*J1D|pg}Piyi-Yljk7=C*eM z6x2-`D!Wd+;>7#@>QZR?5wdV#(jW!?OUV*HRU%dm(n@>SMH-6l!KCs8e}wpA^(h-a z+yB3zSao$?{N7!C6A_s9QCXE3X9_|n{#Kh*ReRP|TSGPOwG^9updQ%4hjP8G+Pu17 zt+y2nYE37|afHr3p>n{{&@{EFkPw30451L>HpJYOmI@j97226Hvn&uC45Br`crf!oH~+^ioLttyZ!B9B0r37nYXNk%e|Z3 zoBieC!kgyjRxH_zcB4#H-E_=e%ATe zn!EDkU@(`p7Se--wcofuBS&`z*$*vo<(Zf{5i@;bAm&dgY2=Vb9%*!rG!pY?b8uzj zMG)pwuaXd)>0BFdNlQrf`D0<@nA;%pc!JxxfHTz2xqb)dnS1Q;`;C^;uB#sql%6~E W^mB|^hGAX?;!NgMR%EiyhJOKzqbOPc literal 0 HcmV?d00001 diff --git a/core/runtime/logs.py b/core/runtime/logs.py index a7b2539..3d4bce0 100644 --- a/core/runtime/logs.py +++ b/core/runtime/logs.py @@ -1,6 +1,6 @@ import logging -def buildLog (action, outputs): +def buildLog (action, outputs, response): #if response.status_code == 200: #print(f"{action.name} successful") try: diff --git a/core/runtime/outputs.py b/core/runtime/outputs.py index ac21762..eb7818e 100644 --- a/core/runtime/outputs.py +++ b/core/runtime/outputs.py @@ -1,5 +1,9 @@ -def buildOutput(response, action, outputs): - +def buildOutput(response, action, outputs):#, select_data): + #if select_data != "not applied": + #response_data = select_data + #else: + #response_data = response.json() + response_data = response.json() response_objects = [response_data] @@ -17,3 +21,5 @@ def buildOutput(response, action, outputs): return outputs + + diff --git a/core/runtime/runtimecontract.py b/core/runtime/runtimecontract.py index cc2ef8d..57e43e4 100644 --- a/core/runtime/runtimecontract.py +++ b/core/runtime/runtimecontract.py @@ -1,10 +1,21 @@ -from core.runtime import buildOutput, buildSave, buildLog +from core.runtime import buildSelect, buildSelect2, buildOutput, buildSave, buildLog + +#select_data = {} def buildRuntimeAttr(action, outputs, response): + #select_data = {} + #response_data = response.json() + + #if hasattr(action, "select"): + #select_data, action, outputs = buildSelect(response, action, outputs) + #else: + #select_data = "not applied" #print("BEFORE buildOutput:", type(outputs)) if hasattr(action, "outputs"): - outputs = buildOutput(response, action, outputs) - + outputs = buildOutput(response, action, outputs)#, select_data) + + if hasattr(action, "select"): + select_data, action, outputs = buildSelect2(action, outputs) #print("AFTER buildOutput:", type(outputs)) #print("DEBUG buildSave") #print("outputs type:", type(outputs)) @@ -15,7 +26,7 @@ def buildRuntimeAttr(action, outputs, response): buildSave(outputs, action) if hasattr(action, "prints"): - buildLog(action, outputs) + buildLog(action, outputs, response) #if hasattr(action, "conversion"): #conversions = action.conversion.items() @@ -26,5 +37,5 @@ def buildRuntimeAttr(action, outputs, response): if action.showstatus is True and response.status_code == 200: print(f"{action.name} successful") - + return outputs, response diff --git a/core/runtime/select.py b/core/runtime/select.py new file mode 100644 index 0000000..2f5e32d --- /dev/null +++ b/core/runtime/select.py @@ -0,0 +1,45 @@ +def buildSelect(response, action, outputs): + #if hasattr(action, "select"): + + response_data = response.json() + #selection = action.select + #print(response_data) + + select_data ={} + for item, index in action.select.items(): + select_data[item] = response_data[item][index] + + print(select_data) + + #if select_data == None: + # selection = "not applied" + #else: + selection = select_data + + return selection, action, outputs + +def buildSelect2(action, outputs): + #print(outputs) + select_data = [] + target = outputs[action.select["source"]] + selectmethod = action.select["selectmethod"] + targetkey = action.select["key"] + targetvalue = action.select["value"] + #for item in target: + for item in target: + #print (item) + for key, value in item.items(): + if selectmethod == "exclude": + if targetkey == key and item[key] != targetvalue: + select_data.append(item) + #print(item) + if selectmethod == "include": + if targetkey == key and item[key] == targetvalue: + select_data.append(item) + #print(item) + print(select_data) + return select_data, action, outputs + #for item in outputs[output_name]: + #for key, value in action.select.include.items(): + #if key in item and item[key] == value: + #select_data.append(item) diff --git a/plugins/rmass/actions/__init__.py b/plugins/rmass/actions/__init__.py index 2d020a5..e3ba84f 100644 --- a/plugins/rmass/actions/__init__.py +++ b/plugins/rmass/actions/__init__.py @@ -1 +1 @@ -from . import login, getcsrf, refresh_tokens, checkavailable, setavailable, setunavailable, setnotset +from . import login, getcsrf, refresh_tokens, checkavailable, setavailable, setunavailable, setnotset, getmessage diff --git a/plugins/rmass/actions/__pycache__/__init__.cpython-314.pyc b/plugins/rmass/actions/__pycache__/__init__.cpython-314.pyc index c382f1abb5e6e6315c61dc460dc74d0b64cfd63e..f8bd9700648dd1648e6c9db6ac16da88e9181d68 100644 GIT binary patch delta 107 zcmX@fbdQNwn~#@^0SGRD`6VMzN|SwJVkEPlCdb5+ jsuMqZEARouK;p$9#s_9bM#lRLsn;1&FEgYT@c@MYW#)Cuni>cL)Bk z8J-I}m%6yO1_HMfO}3c+(=xM=?_^8?-QhIKD! zp`@TWUza)6Qt}Fh*0f$V%d#?1ff?!k3k+QfdvH(dTNj^6l{YK#N`SB;hd<-ozu(ODtJS5Z8_4pic zQi4)q4wE8RXsAdquPbvj2RsaR_=WM#-(IXAWr&S>$(V!+OQ95KIZNu2i6&>uXRH)? z@ugmw;cJaqE%UYbOGayrjYcyNNn*u5W4(aN&_=@7e6yrR1miFADm8ANnpkD^cZCAAGW5XV zHv%&gW_A;#h4%s`+~22uklUTr=8R=^2`m-MJY}*hMP>bwtSR(7uargX&)ME6#Ts1{ z|2Z{lE=}~RtW#aUnS5aB9Q)M5rp|L5XB*yY{hM%PQ*ftsZ-&Qh+&w1osHGhx(Nl~2 zr`u?JJ=>*e7kGDR=LLPY4ZAT3hMR2bpIpD&`n}DIt>52#?0P}$+U5PQ^W46B70UZo F?+= 3600" +#} + +#availabletime = int(os.environ.get("AVAILABLE_DURATION",3)) + +#duration = availabletime - 1 + +#keys = [ +# { +# "keytitle": "option", +# "keyvalue": 1, +# }, +# { +# "keytitle": "duration", +# "keyvalue": duration, +# }, +#] + +method = "GET" + +#messageid = 49971192 + +#path = f"https://rentmasseur.com/api/v1/mailbox/{messageid}" +#path = [ +# "https://rentmasseur.com/api/v1/mailbox/", +# {"output": "[messageid][0].id"} +#] + +path = [ + "https://rentmasseur.com/api/v1/mailbox/", + { + "output": "messageid", + "keys": [0, "id"] + } +] + +#path = os.path.join(baseurl.messageid) + +headers = { + "Authorization": { + "output": "access_token", + "prefix": "Bearer ", + }, +} + +outputs = { + "conversation": "messages" +} + +#prints = { +# "message": "messages" +#} diff --git a/plugins/rmass/actions/pullmessagelist.py b/plugins/rmass/actions/pullmessagelist.py new file mode 100644 index 0000000..ced788b --- /dev/null +++ b/plugins/rmass/actions/pullmessagelist.py @@ -0,0 +1,52 @@ +name = "Get message list" + +kind = "action" + +id = "getmessagelist" + +showstatus = True + +#skipstep = { +# "checkavailable": "validTo >= 3600" +#} + +#availabletime = int(os.environ.get("AVAILABLE_DURATION",3)) + +#duration = availabletime - 1 + +#keys = [ +# { +# "keytitle": "option", +# "keyvalue": 1, +# }, +# { +# "keytitle": "duration", +# "keyvalue": duration, +# }, +#] + +method = "GET" + +#path = "https://rentmasseur.com/api/v1/mailbox?page=1&folder=1&sort=1" +path = "https://rentmasseur.com/api/v1/mailbox" +headers = { + "Authorization": { + "output": "access_token", + "prefix": "Bearer ", + }, +} + +select = { + "source": "emails", + "selectmethod": "exclude", + "key": "unread", + "value": 0, +} + +outputs = { + "emails": "emails" +} + +#prints = { +# "messageid": "id" +#} diff --git a/plugins/rmass/operations/__init__.py b/plugins/rmass/operations/__init__.py index c6042c6..0366f92 100644 --- a/plugins/rmass/operations/__init__.py +++ b/plugins/rmass/operations/__init__.py @@ -1,2 +1,2 @@ -from . import login, checkavailable, setavailable +from . import login, checkavailable, setavailable, pullmessagelist diff --git a/plugins/rmass/operations/__pycache__/__init__.cpython-314.pyc b/plugins/rmass/operations/__pycache__/__init__.cpython-314.pyc index 1646f6611de00a4d6343c18a60c168a41e036762..20211af82e1aabc5f890f8e14092cbcd8d501126 100644 GIT binary patch delta 141 zcmey!*v-VN&Bx2d00ei=oyu~V$SbKW2jny`#4!djdNO!0mN0rSl`wfQmoR&`g^#4!djdNO!0mN0rSl`wfQmoUpS1TiTy zXfnTK1S-&Eo*1Yq=%>kYi=l`a$S-065v&vE2Fij=11Txy1`;2b85tSxGZ!4;$@StyE)J*_yc~2|6*e& z+jwAQ7q}mAgVDk%9y9aaycy=$-57!iw)cAfi~v5n;x}-gERRgmz%|6^0z#xvh!qYk zW$iL>g%v~breND&s27fzc@b7xRdeAE;yiDqxoeI}Dnumcr lG|*ZIp$~}OAX+%P4Ouwb4QU5pkKW0swe2=", +# "value": 3600, +# } +#} + +#role = "activate" + +#sleeptime = 180 diff --git a/pullmessagelist (Copy).py b/pullmessagelist (Copy).py new file mode 100644 index 0000000..07a469e --- /dev/null +++ b/pullmessagelist (Copy).py @@ -0,0 +1,28 @@ +import time +from plugins import rmass +from core.execution.operation import buildOperation + +outputs = buildOperation(rmass.operations.pullmessagelist) + +#print(outputs) +user_list = [] +for item in outputs["message_list"]: + sender = item["userCard"] + user_list.append(sender["id"]) +print(user_list) + +conversations = [] +for item in outputs["message_list"]: + conversation = item["id"] + conversations.append(conversation) + +print(conversations) +#for messageid in user_list + #outputs = buildOperation(rmass.operations.getmessage) +#id_list = [] +#for user in user_list +# id_list.append +# print + + +#ime.sleep(rmass.operations.setavailable.sleeptime) diff --git a/pullmessagelist.py b/pullmessagelist.py new file mode 100644 index 0000000..08fb56f --- /dev/null +++ b/pullmessagelist.py @@ -0,0 +1,38 @@ +import time +from plugins import rmass +from core.execution.operation import buildOperation +from core.execution.action import buildAction +#from plugins.rmass.actions.getmessage import getmessageaction + +outputs = buildOperation(rmass.operations.pullmessagelist) + +#print(outputs) +#print(messageid) +#user_list = [] +#for item in outputs["message_list"]: +# sender = item["userCard"] +# user_list.append(sender["id"]) +#print(user_list) + +#conversations = [] +#for item in outputs["message_list"]: +# conversation = item["id"] +# conversations.append(conversation) + +#print(conversations) + +#for messageid in conversations: +#outputs = buildAction(rmass.actions.getmessage, outputs) + +#print(outputs) + + +#for messageid in user_list + #outputs = buildOperation(rmass.operations.getmessage) +#id_list = [] +#for user in user_list +# id_list.append +# print + + +#ime.sleep(rmass.operations.setavailable.sleeptime) diff --git a/tokens.json b/tokens.json index 4d2c043..c6b3d6b 100644 --- a/tokens.json +++ b/tokens.json @@ -1 +1 @@ -{"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTE2NzQzMzAsIm5iZiI6MTc5MTY3NDE1MCwic3ViIjoiMjM4MzAyIiwidXNlcm5hbWUiOiJYeHhvdGlxIiwidXNlclR5cGUiOjEsInN0YWdlTmFtZSI6Ilh4eG90aXEiLCJhcHByb3ZlZCI6MSwibG9jYXRpb25JZCI6NDcyLCJzZWFyY2hDaXR5IjoiYXRsYW50YSIsImNvdW50cnlTaG9ydCI6IlVTIiwic2Vzc2lvbkNvdW50cnlDb250aW5lbnQiOiJOQSIsImlzRnJvemVuIjowLCJsb2NhdGlvbkxhYmVsIjoiQXRsYW50YSwgR0EiLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MTY3NDIxMH0.HcqR4crgZkqdaSKpY3EiC8aejvlgQppKZbV_El8MeCPzoRSHssJcDtj5dmDXjP3VhjseIbgPvCqDxKC2jb3Qdg", "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTQyNjYyMTAsIm5iZiI6MTc5MTY3NDE1MCwianRpIjoiZTJRY3FUYnNBSjRpZWNSQ0JEWUdXY2pvYkxDREkrS05mRUwzQUU1OEk3az0iLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MTY3NDIxMCwic3ViIjoiMjM4MzAyIn0.ExbPr-h99AVPpB0RTZs_3h15rY1clue95tGb0Cq0qrqkhaWloB8G6v7vmCFqJcpVyW1YHLrw45zOjPv9uZ25oA"} \ No newline at end of file +{"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTE4MTU5NzksIm5iZiI6MTc5MTgxNTc5OSwic3ViIjoiMjM4MzAyIiwidXNlcm5hbWUiOiJYeHhvdGlxIiwidXNlclR5cGUiOjEsInN0YWdlTmFtZSI6Ilh4eG90aXEiLCJhcHByb3ZlZCI6MSwibG9jYXRpb25JZCI6NDcyLCJzZWFyY2hDaXR5IjoiYXRsYW50YSIsImNvdW50cnlTaG9ydCI6IlVTIiwic2Vzc2lvbkNvdW50cnlDb250aW5lbnQiOiJOQSIsImlzRnJvemVuIjowLCJsb2NhdGlvbkxhYmVsIjoiQXRsYW50YSwgR0EiLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MTgxNTg1OX0.oxYvEJrX9lQRiHtaOndLLv8bZGo1AVboC6xjKljnrHmXSJe52-urHrQsTyc1XlJV08a5z_1ctYR8yGmYejwjeQ", "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTQ0MDc4NTksIm5iZiI6MTc5MTgxNTc5OSwianRpIjoiK25FQmd1VGxlN1g2N1V3NXBEUXRMMXRQTzZYMEdHcGZYMW1vaXNNYVNxRT0iLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MTgxNTg1OSwic3ViIjoiMjM4MzAyIn0.hTff0wNuOgBQTTYdt9DpVjVwyxj5oA4C7SBWwmY0Uaf5M2kfhI_YWCJRJL9oGrDfHt32N3_PEsfPRWQZBcZJdw"} \ No newline at end of file