Get the data to save from the request data
(data)
| 24 | |
| 25 | |
| 26 | def get_user_data(data): |
| 27 | """ |
| 28 | Get the data to save from the request data |
| 29 | """ |
| 30 | out = { |
| 31 | "username": data["login"], |
| 32 | "avatar": data["avatar_url"], |
| 33 | "name": data["name"], |
| 34 | } |
| 35 | if data["blog"]: |
| 36 | if not (website := data["blog"]).startswith("http"): |
| 37 | website = "http://" + website |
| 38 | |
| 39 | out["website"] = website |
| 40 | |
| 41 | return out |
| 42 | |
| 43 | |
| 44 | def add_entry(opt, filedata, username): |
no outgoing calls
no test coverage detected