Commit graph

312 commits

Author SHA1 Message Date
bd61afd24d
Replace many logger.info with debug. 2021-09-22 18:17:14 -07:00
15879bc78c
Put Richard's github link back into the readme. 2021-09-22 15:52:49 -07:00
936c392d58
Add account registration. 2021-09-22 15:48:21 -07:00
9bc2c8f79f
Alphabetize imports. 2021-09-22 11:23:15 -07:00
2b157d6931
Make all three modules available from package init. 2021-09-22 11:19:39 -07:00
0203246582
Let ValidationError, RequestError have a common MegaError parent. 2021-09-22 11:17:59 -07:00
57b7b08101
Add tenacity retry for JSONDecodeError. 2021-08-31 02:30:53 -07:00
78cb1706ed
Warn when a file's attributes did not decrypt properly. 2021-08-31 01:30:10 -07:00
46ce080a7f
Fix export_files response of only one file. 2021-08-31 01:29:38 -07:00
3507b72eb5 Add RequestDraft which allows for batching of arbitrary API calls. 2020-12-23 20:16:07 -08:00
Ethan Dalool
91fb75567c Remove unused options. 2020-11-12 15:04:22 -08:00
Ethan Dalool
e3cc36f028 Rename this public_handle -> file_id 2020-11-12 04:16:17 -08:00
Ethan Dalool
d0cd38e5c5 Rewrite get_transfer_quota.
I believe the original implementation of get_quota was confusing disk
vs bandwidth quota, considering get_storage_space already exists and
get_quota was checking the same mstrg attributes etc. This clearly
renames the get_quota method to get_transfer_quota and checks the
mxfer/tah to see bandwidth usage.
2020-11-12 03:56:27 -08:00
Ethan Dalool
c39094a8df Clarify these docstrings regarding file id vs. public handle. 2020-11-12 03:51:07 -08:00
Ethan Dalool
19e3579da3 Use cached trash id instead of NODE_TYPE_TRASH which calls api.
The internals of move call get_node_by_type which calls get_files,
unless we use the known cached id directly.
2020-11-12 00:40:16 -08:00
Ethan Dalool
572ce2d627 Don't fetch trash node id until needed.
Fetching trash's ID performs a call to get_files which can be
somewhat slow. Some use cases do not require ever calling get_files.
2020-11-11 21:58:34 -08:00
Ethan Dalool
40644921dc Reuse this key list instead of creating a new one each loop. 2020-11-11 21:41:05 -08:00
Ethan Dalool
ce789e105e Fix backwards cstrg, mstrg. Add 'used'.
Totally my fault.
2020-11-11 21:36:27 -08:00
Ethan Dalool
d10af70992 Use requests.Session. 2020-11-11 21:34:53 -08:00
Ethan Dalool
97d1467210 Add errors.EPAYWALL. 2020-11-05 16:34:08 -08:00
Ethan Dalool
3fa60a3e3e Fix typo "weblient". 2020-10-25 20:17:24 -07:00
Ethan Dalool
75c746f981 Rename cached _files to _nodes. 2020-10-01 12:09:53 -07:00
Ethan Dalool
35f5cb9fe7 Return total and remaining from get_quota, don't convert to mb. 2020-10-01 12:09:32 -07:00
Ethan Dalool
66c0c8f179 Return exported urls as dict of {id: url}. 2020-10-01 12:09:02 -07:00
Ethan Dalool
400701f50d Dedent by raising early. 2020-10-01 11:27:31 -07:00
Ethan Dalool
5609db3482 Allow exporting multiple files at once via batch request. 2020-10-01 11:26:31 -07:00
Ethan Dalool
9492be4899 Cache the result of get_files into variable _files.
get_files is a slow method, and there are lots of calls to it
throughout the code. Not changing any methods to use this cached
value just yet, but it really helps in the REPL at least.
2020-10-01 11:23:50 -07:00
Ethan Dalool
95de60fd86 Let _api_request return batch responses from batch requests. 2020-10-01 11:21:57 -07:00
Ethan Dalool
2ad6024ad8 Slightly jank fix to deal with extra data after json dict.
Even though the dict decodes just fine, I'm having some cases where
there is additional data after it. The data looks like random junk
bytes.
2020-10-01 11:21:32 -07:00
Ethan Dalool
5a2f14b312 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	README.md
#	src/mega/crypto.py
#	src/mega/errors.py
#	src/mega/mega.py
2020-09-21 21:39:25 -07:00
Richard O'Dwyer
c27d8379e4 speed up CI 2020-06-25 21:48:06 +01:00
Richard O'Dwyer
04bae1885a Back to development: 1.0.9 2020-06-25 21:44:31 +01:00
Richard O'Dwyer
34f3e73359 Preparing release 1.0.8 2020-06-25 21:44:19 +01:00
Richard O'Dwyer
cf1a1196a8 docs 2020-06-25 21:40:12 +01:00
Richard
6daa2bdf3c
Merge pull request #8 from odwyersoftware/fixes2
Various fixes
2020-06-25 21:37:25 +01:00
Richard O'Dwyer
74939e07b4 lint 2020-06-25 21:36:43 +01:00
Richard O'Dwyer
aaac16a8cc fix issue #6 2020-06-25 21:15:36 +01:00
Richard O'Dwyer
781e3a267b various fixes 2020-06-25 21:03:16 +01:00
Richard O'Dwyer
aa89af0324 Updates URL parsing, updates API error code handling 2020-06-21 16:18:22 +01:00
Richard O'Dwyer
631ca606ff link to the website 2020-04-28 17:15:12 +01:00
Richard O'Dwyer
ecf42c1b35 Preparing release 1.0.7 2020-03-25 20:09:37 +00:00
Ethan Dalool
d29751221c Fix missing self. on shared_keys. 2020-03-23 21:21:17 -07:00
Ethan Dalool
09f993405a Alphabetize remaining imports. 2020-03-23 21:20:35 -07:00
Ethan Dalool
1626bc85d8 Remove import-froms for tenacity. 2020-03-23 21:20:15 -07:00
Ethan Dalool
132342e4f6 Remove import-froms for pathlib. 2020-03-23 21:17:22 -07:00
Ethan Dalool
015e5a2773 Remove import-froms for crypto. 2020-03-23 21:08:49 -07:00
Ethan Dalool
6d59de416e Remove import-froms for errors. 2020-03-23 21:04:39 -07:00
Ethan Dalool
86e6756b2c Remove some double blank lines. 2020-03-23 21:04:39 -07:00
Ethan Dalool
a394f9829f Add function crypto.interleave_xor_8. 2020-03-23 21:04:34 -07:00
Ethan Dalool
ae3bcbc9e4 Add method import_public_folder. 2020-03-23 20:47:17 -07:00