Forgejo.py/README.md

37 lines
1.1 KiB
Markdown

# Forgejo.py
Python Wrapper for Forgejo API (WIP)
# Sample usage.
from Forgejo import Forgejo
'''
forgejo = Forgejo()
'''
# It will ask you your Forgejo instance url and your access token to it and save the config to config/forgejo.txt
# Current implemented Forgejo API endpoints you can call:
forgejo.admin_users_create()
forgejo.admin_users_list()
forgejo.notifications_new()
forgejo.repos_get_repo()
forgejo.repos_issues_search()
forgejo.repos_owner_repo_issues()
forgejo.repos_owner_repo_issues_comments()
forgejo.repo_owner_get_metada()
forgejo.repo_owner_create_file()
forgejo.repo_owner_update_file()
forgejo.repo_owner_delete_file()
forgejo.user()
Some of above methods will need required params that will be shown to you when running them. In ex.:
forgejo.repos_issues_search()
*** TypeError: repos_issues_search() missing 1 required positional argument: 'owner'
Just pass the param to the object like this:
forgejo.repos_issues_search("your_forgejo_username")