Skip to content

docs: sync README + examples to v0.1.1 typed-model field names#7

Merged
OussemaFr merged 1 commit into
mainfrom
docs/sync-readme-examples-to-v0.1.1
Jun 22, 2026
Merged

docs: sync README + examples to v0.1.1 typed-model field names#7
OussemaFr merged 1 commit into
mainfrom
docs/sync-readme-examples-to-v0.1.1

Conversation

@OussemaFr

Copy link
Copy Markdown
Member

Why

v0.1.1 (#6) rewrote `PageInfo`, `GroupInfo`, and `ProfileInfo` with the real field names the API returns. The README and two example scripts still referenced the v0.1.0 field names — anyone copy-pasting the quickstart code would hit `AttributeError`.

Mapping

v0.1.0 (in stale docs) v0.1.1 (real)
`page.name` `page.title`
`page.likes` `page.likes_count`
`page.followers` `page.followers_count`
`page.about` `page.bio`
`page.verified` dropped (no equivalent in real response)
`profile.followers` `profile.followers_count`
`profile.posts_count` `profile.media_count`

`profile.full_name`, `profile.is_verified`, and `profile.is_private` were already correct in v0.1.0 — kept as-is.

Files touched

  • `README.md` — quickstart code block + async example block
  • `examples/quickstart.py` — Facebook + Instagram print sections
  • `examples/migrate-from-kevinzg.py` — page-info print section

What does NOT change

  • No SDK code modified (purely docs / examples)
  • Wire-level behavior, exception hierarchy, migration aliases all unchanged
  • Test suite still 33 passing, 80% coverage

Verification

```
ruff check . → All checks passed!
ruff format --check . → 17 files already formatted
pytest → 33 passed
```

v0.1.0's README and examples used the field names I'd guessed for
the typed models. v0.1.1 (PR #6) rewrote the models with the real
field names the API returns. The README + two example scripts
still referenced the old names — anyone copy-pasting the code
would get AttributeError.

Field-name fixes (applied to README + examples/quickstart.py +
examples/migrate-from-kevinzg.py):

  page.name        → page.title
  page.likes       → page.likes_count
  page.followers   → page.followers_count
  page.about       → page.bio
  page.verified    → dropped (no equivalent in real API response)
  profile.followers   → profile.followers_count
  profile.posts_count → profile.media_count

profile.full_name and profile.is_verified were already correct.

Verified locally:
  ruff check .          → All checks passed!
  ruff format --check . → 17 files already formatted
  pytest                → 33 passed, 80% coverage

No code changes to the SDK — pure docs / example sync.
@OussemaFr OussemaFr merged commit e5639b5 into main Jun 22, 2026
6 checks passed
@OussemaFr OussemaFr deleted the docs/sync-readme-examples-to-v0.1.1 branch June 22, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant