Skip to content

Commit

Permalink
feat: add basic example of usage
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Sep 17, 2023
1 parent 6a40372 commit a314f32
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/get_issue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from asyncio import run

from dotenv import load_dotenv

from ya_tacker_client import YaTrackerClient


load_dotenv()
# from registered application at Yandex OAuth - https://oauth.yandex.ru/
API_TOKEN = os.getenv('API_TOKEN')
# from admin panel at Yandex Tracker - https://tracker.yandex.ru/admin/orgs
API_ORGANISATION_ID = os.getenv('API_ORGANISATION_ID')


async def main() -> None:
client = YaTrackerClient(
organisation_id=API_ORGANISATION_ID,
oauth_token=API_TOKEN,
)
issue = await client.get_issue('TRACKER-1')
print(issue)
await client.stop()


if __name__ == '__main__':
run(main())

0 comments on commit a314f32

Please sign in to comment.