Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ jobs:
run: poetry run pre-commit run check-xml --all-files
- name: 🚀 Check YAML files
run: poetry run pre-commit run check-yaml --all-files
- name: 🚀 Check YAML files
run: poetry run pre-commit run check-yaml --all-files
- name: 🚀 Detect Private Keys
run: poetry run pre-commit run detect-private-key --all-files
- name: 🚀 Check End of Files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: 🏗 Install dependencies
run: poetry install --no-interaction
- name: 🚀 Run mypy
run: poetry run mypy examples src tests
run: poetry run mypy src tests
23 changes: 11 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
sonar.projectKey=joostlek_python-opensky
sonar.projectKey=joostlek_python-youtube
sonar.organization=joostlek-github
sonar.projectName=Asynchronous Python client for the OpenSky API
sonar.projectName=Asynchronous Python client for the YouTube V3 API
sonar.projectVersion=1.0

sonar.links.homepage=https://github.com/joostlek/python-opensky
sonar.links.ci=https://github.com/joostlek/python-opensky/actions
sonar.links.issue=https://github.com/joostlek/python-opensky/issues
sonar.links.scm=https://github.com/joostlek/python-opensky/tree/main
sonar.links.homepage=https://github.com/joostlek/python-youtube
sonar.links.ci=https://github.com/joostlek/python-youtube/actions
sonar.links.issue=https://github.com/joostlek/python-youtube/issues
sonar.links.scm=https://github.com/joostlek/python-youtube/tree/main

sonar.language=py
sonar.sourceEncoding=UTF-8
Expand Down
2 changes: 0 additions & 2 deletions src/python_youtube/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"""Asynchronous Python client for the YouTube V3 API."""

__all__ = []
20 changes: 20 additions & 0 deletions src/python_youtube/youtube.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""The YouTube API."""
__all__ = [
"YouTube",
]


class YouTube:
"""YouTube API client."""

def __init__(self) -> None:
"""Initialize the YouTube client."""
self.test = "ack"

def syn(self) -> str:
"""Test method."""
return self.test

def ack(self) -> str:
"""Test method."""
return self.test
8 changes: 8 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Tests for the YouTube Library."""
from pathlib import Path


def load_fixture(filename: str) -> str:
"""Load a fixture."""
path = Path(__package__) / "fixtures" / filename
return path.read_text(encoding="utf-8")
9 changes: 9 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Tests for the YouTube client."""
from python_youtube.youtube import YouTube


async def test_init() -> None:
"""Test if YouTube client can be created."""
youtube = YouTube()
assert youtube.syn() == "ack"
assert youtube.ack() == "ack"