Commit Graph

20 Commits (206e7eba0cca2974f6178316a2a0a997f0a096e2)

Author SHA1 Message Date
juga 206e7eba0c Pass request data dict as json arg, not data arg
`requests.post` data argument is used to send that in the **body** request,
not as json header.
The json argument can be a dictionary and doesn't need to be converted to
string.
2020-11-23 12:45:34 +00:00
juga 561d0c54e7 Replace method name to be more meanful
and improve test assertions
2020-11-23 12:45:34 +00:00
juga 4cea94f1fa Test pygnunetrest using docker and gitlab CI 2020-11-23 12:45:34 +00:00
juga b77874ce27 Replace dockerfile to build gnunetrest, not gnunet 2020-11-23 12:45:34 +00:00
juga bfd79583e7 Build the docker image only when there're changes 2020-11-23 12:45:34 +00:00
juga 9c13e50ec4 Build the docker image using the cache 2020-11-23 12:45:34 +00:00
juga 14f40531aa Replace conn var by constant 2020-11-23 12:45:34 +00:00
juga a22497bd21 Remove unused import 2020-11-23 12:45:34 +00:00
juga 52fff7dacc Update docstrings accordingly 2020-11-23 12:45:34 +00:00
juga 969b3ac8d3 Replace var name by more descriptive name 2020-11-23 12:45:34 +00:00
juga 1c17cb00c4 Replace fetch_identity function names
to better show what they do
2020-11-23 12:45:34 +00:00
juga 531b242ebd Replace args names to make them clearer
- remove the article
- separate words by undersore
- add adjetive
2020-11-23 12:45:34 +00:00
juga d9831d15af Add setup files to be able to install the package 2020-11-23 12:45:34 +00:00
juga 34e4bb6e71 Replace example by failing tests 2020-11-23 12:45:34 +00:00
juga 0ca33a1dec Store URL paths in the class
so that there's no need to build the whole URL every time.
Also:
- stop converting back and forth dictionaries and json strings
- rename response to r
- return tuples when there's an error to know the error
- use inline if
2020-11-23 12:45:34 +00:00
juga 48204d83be Rename module 2020-11-23 12:45:34 +00:00
juga 000a2de569 Pythonize method names
and set comment as docstring.
2020-11-23 12:45:34 +00:00
juga 852138b8b6 Rename gnunetconnector to gnunetrest 2020-11-23 12:45:34 +00:00
juga e8c15e55de Reformat code with black 2020-11-23 12:45:34 +00:00
nkls ddfe1329ee Convert nkls' gnunet-docker repo to pygnunetrest
ie. the python code and docker that is only for the GNUnet REST API and
not the docker for building a GNUnet docker image.

Squasing all nkls' commits and appling juga's MR:
https://gitlab.com/nkls_pep/gnunet-docker/-/merge_requests/1
2020-11-23 12:40:42 +00:00