Skip to content

Commit

Permalink
Update changelog for v0.0.40 (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX authored Feb 4, 2024
1 parent fddf9ac commit 3bbfa43
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Change Log

## Version 0.0.40

**04.02.2024**

Syntax sugar for records is here! Check out how simple work with basic operations is:
```python
from atproto import AtUri, Client, models

client = Client()
client.login('my-username', 'my-password')

# get records list
posts = client.app.bsky.feed.post.list(client.me.did, limit=10)
for uri, post in posts.records.items():
print(uri, post.text)

# get specific record
post = client.app.bsky.feed.post.get(client.me.did, AtUri.from_str(uri).rkey)
print(post.value.text)

# create new record
post_record = models.AppBskyFeedPost.Record(text='test record namespaces', created_at=client.get_current_time_iso())
new_post = client.app.bsky.feed.post.create(client.me.did, post_record)
print(new_post)

# delete record
deleted_post = client.app.bsky.feed.post.delete(client.me.did, AtUri.from_str(new_post.uri).rkey)
print(deleted_post)
```

**⚠️ Record models have been renamed from "Main" to "Record". Backward compatibility is provided but will be removed soon!**
**⚠️ Internals of High-Level Clients have been migrated to new syntax sugar. It could affect you because returned models are changed but the fields are the same.**

* Add record syntax sugar with get, list, create, and delete methods by @MarshalX in https://github.com/MarshalX/atproto/pull/263
* Rename record models from "Main" to "Record" by @MarshalX in https://github.com/MarshalX/atproto/pull/264
* Integrate syntax sugar for repo operations upon records by @MarshalX in https://github.com/MarshalX/atproto/pull/266

## Version 0.0.39

**02.02.2024**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ for uri, post in posts.records.items():
post = client.app.bsky.feed.post.get(client.me.did, AtUri.from_str(uri).rkey)
print(post.value.text)

post_record = models.AppBskyFeedPost.Main(text='test record namespaces', created_at=client.get_current_time_iso())
post_record = models.AppBskyFeedPost.Record(text='test record namespaces', created_at=client.get_current_time_iso())
new_post = client.app.bsky.feed.post.create(client.me.did, post_record)
print(new_post)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/readme.content.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ for uri, post in posts.records.items():
post = client.app.bsky.feed.post.get(client.me.did, AtUri.from_str(uri).rkey)
print(post.value.text)

post_record = models.AppBskyFeedPost.Main(text='test record namespaces', created_at=client.get_current_time_iso())
post_record = models.AppBskyFeedPost.Record(text='test record namespaces', created_at=client.get_current_time_iso())
new_post = client.app.bsky.feed.post.create(client.me.did, post_record)
print(new_post)

Expand Down

0 comments on commit 3bbfa43

Please sign in to comment.