Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: base project structure #2

Merged
merged 6 commits into from
Sep 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add basic example of usage
  • Loading branch information
danfimov committed Sep 17, 2023
commit a314f32eb6c3a45eed44e8130b3e538ba3cfd734
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())