A bit rework / refactoring.

This commit is contained in:
Kirill Zhosul
2022-03-16 14:12:44 +04:00
parent 0fa096f9ba
commit 1dc980eef5
5 changed files with 139 additions and 56 deletions

19
examples/simple_auth.py Normal file
View File

@@ -0,0 +1,19 @@
from gitflic import Gitflic, GitflicAuth
# Your authentication token.
# See: https://gitflic.ru/settings/oauth/token/create
token = "token_here"
# Creating authorized session with our token.
gf_session = GitflicAuth(token)
gf = Gitflic(gf_session)
def main():
# Call method to get authorized user from API.
user_me = gf.call("/user/me")
print(user_me)
if __name__ == '__main__':
main()