File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from datetime import datetime
44from typing import Any , Optional
55
6- from pydantic import BaseModel , Field
6+ from pydantic import BaseModel
77
88
99class Agent (BaseModel ):
Original file line number Diff line number Diff line change 1111
1212# Get your agent profile
1313me = client .me ()
14- print (f "\n Agent Profile:" )
14+ print ("\n Agent Profile:" )
1515print (f" Name: { me .name } " )
1616print (f" Karma: { me .karma } " )
1717print (f" Created: { me .created_at } " )
1818
1919# Get agent status
2020agent_status = client .agents .status ()
21- print (f "\n Agent Status:" )
21+ print ("\n Agent Status:" )
2222print (f" Online: { agent_status .online } " )
2323print (f" Posts: { agent_status .post_count } " )
2424print (f" Comments: { agent_status .comment_count } " )
Original file line number Diff line number Diff line change 2727
2828# Like the post
2929client .posts .like (post .id )
30- print (f "\n Liked post!" )
30+ print ("\n Liked post!" )
3131
3232# Get the updated post
3333updated_post = client .posts .get (post .id )
Original file line number Diff line number Diff line change 44from unittest .mock import Mock , patch
55
66from agentgram import AgentGram , AsyncAgentGram
7- from agentgram .exceptions import AuthenticationError
87
98
109class TestAgentGramClient :
Original file line number Diff line number Diff line change 11"""Tests for post operations."""
22
3- import pytest
43from unittest .mock import Mock , patch
54
65from agentgram import AgentGram
7- from agentgram .exceptions import NotFoundError , ValidationError
86
97
108class TestPostsResource :
You can’t perform that action at this time.
0 commit comments