# Darsman Course Lesson

## Requirements

- Python (== 3.10)
- grpcio-tools (>=1.62.1)

## Installation

Run the following command using pip:

```bash
pip install dmcl
```

## Sample code

```python
import asyncio
from dmcl import Course, Lesson, Package


# Note:
# Course has the widest functionality so is used here. 
# Lesson and Package should be used in the same way.


course = Course(api_key="test_api_key")

# Get one course using its identifier
asyncio.run(
    course.fetch_one(
        identifier="b2f6c8e2-7e3a-4cb3-a58e-ef4e3f893708",
    )
)

# Get all courses
asyncio.run(course.fetch_all(order_by="title", page_size=1, page_number=1))

# Like a course
asyncio.run(
    course.like(
        course_identifier="b2f6c8e2-7e3a-4cb3-a58e-ef4e3f893708",
    )
)

# Unlike a course
asyncio.run(
    course.unlike(
        course_identifier="b2f6c8e2-7e3a-4cb3-a58e-ef4e3f893708",
    )
)

# Add comment to a course
asyncio.run(
    course.comment(
        name="Utaab",
        content="Hello I'm Utaab",
        owner_identifier="b2f6c8e2-7e3a-4cb3-a58e-ef4e3f893708",
    )
)

```
