docs: fix more parameter mismatches and job name inaccuracies

- Fix feed.following -> feed.followingfeed (actual function name)
- Fix branch.listbyname: doesn't filter by name, just lists branches with pagination
- Fix branch.get: parameter is branch_slug not branchName
- Fix follow.follow: takes payload dict, not username string
- Add pagination parameter docs for feed.cafefeed and feed.followingfeed
- Revert GitLab URL changes (correct - points to upstream repo)
This commit is contained in:
Jezza Hehn 2026-04-18 02:57:41 +00:00
parent e7cf4f1e09
commit 17d6ed69d1
4 changed files with 53 additions and 24 deletions

View file

@ -620,7 +620,7 @@ python -m pytest tests/
For issues, questions, or contributions:
- [TrustCafé Website](https://trustcafe.io)
- [Forgejo Repository](https://git.jezzahehn.com/KrustyPlanet/trustcafe-api-wrapper)
- [GitLab Repository](https://gitlab.com/trustcafe/trustcafe-api-wrapper)
- Contact the WikiTribune team
## Version History

View file

@ -340,21 +340,39 @@ Manage follow relationships.
### follow.follow()
Follows a user.
Follow or unfollow a user or subwiki.
```python
result = API.run_job('follow.follow', username)
result = API.run_job('follow.follow', payload)
```
**Parameters:**
- `username` (str): The username to follow
- `payload` (dict): Follow payload containing:
- `isFollowing` (bool): `true` to follow, `false` to unfollow
- `parent` (dict): Object with `pk` and `sk` for the target
- `followType` (str): Entity type (`'userprofile'` or `'subwiki'`)
- `parentSlug` (str): Slug of the user or subwiki
- `preferences` (dict, optional): Notification preferences
**Returns:** dict - Follow status
**Returns:** dict - Follow relationship data
**Example:**
```python
followed = API.run_job('follow.follow', "another-user")
print(f"Follow status: {followed}")
# Follow a user
followed = API.run_job('follow.follow', {
"isFollowing": true,
"parent": {
"pk": "userprofile#philosopher-jon",
"sk": "userprofile#philosopher-jon"
},
"followType": "userprofile",
"parentSlug": "philosopher-jon",
"preferences": {
"notification": true,
"emailNew": false,
"emailDigest": true
}
})
```
---
@ -591,38 +609,47 @@ Manage branches (platform branches or sub-wikis).
Get a specific branch.
```python
branch = API.run_job('branch.get', branch_name)
branch = API.run_job('branch.get', branch_slug)
```
**Parameters:**
- `branchName` (str): The branch identifier
- `branch_slug` (str): The branch/subwiki slug identifier
**Returns:** dict - Branch data
**Example:**
```python
branch = API.run_job('branch.get', "main")
print(branch.get('branchName'))
branch = API.run_job('branch.get', "music")
print(branch.get('slug'))
```
---
### branch.listbyname()
List branches by name prefix.
List all branches with pagination.
```python
branches = API.run_job('branch.listbyname', prefix)
branches = API.run_job('branch.listbyname', lastEvaluatedKey)
```
**Parameters:**
- `prefix` (str): String prefix for branch names
- `lastEvaluatedKey` (dict, optional): Pagination key for next page
**Returns:** dict - List of matching branches
**Returns:** dict - List of branches
**Note:** Despite the name, this does not filter by branch name. It lists all branches.
**Example:**
```python
music_branches = API.run_job('branch.listbyname', "music")
# Get first page of branches
branches = API.run_job('branch.listbyname')
for branch in branches.get('Items', []):
print(branch.get('slug'))
# Get next page
if 'LastEvaluatedKey' in branches:
next_page = API.run_job('branch.listbyname', branches['LastEvaluatedKey'])
```
---
@ -639,7 +666,8 @@ Get the café-wide feed.
feed = API.run_job('feed.cafefeed')
```
**Parameters:** None
**Parameters:**
- `lastEvaluatedKey` (dict, optional): Pagination key
**Returns:** dict - Café feed content
@ -651,21 +679,22 @@ print(f"Feed items: {len(cafefeed.get('Items', []))}")
---
### feed.following()
### feed.followingfeed()
Get feed for users you follow.
```python
feed = API.run_job('feed.following')
feed = API.run_job('feed.followingfeed')
```
**Parameters:** None
**Parameters:**
- `lastEvaluatedKey` (dict, optional): Pagination key
**Returns:** dict - Following feed content
**Example:**
```python
following_feed = API.run_job('feed.following')
following_feed = API.run_job('feed.followingfeed')
print(f"Following feed items: {len(following_feed.get('Items', []))}")
```

View file

@ -118,7 +118,7 @@ If you can't find the answer you're looking for:
1. **Check the FAQs section** - Common questions and answers
2. **Review the Troubleshooting guide** - For specific error handling
3. **Contact WikiTribune team** - Via company channels
4. **File an issue on Forgejo** - [Repository Issues](https://git.jezzahehn.com/KrustyPlanet/trustcafe-api-wrapper/issues)
4. **File an issue on GitLab** - [Repository Issues](https://gitlab.com/trustcafe/trustcafe-api-wrapper/-/issues)
---

View file

@ -729,8 +729,8 @@ requests_log.propagate = True
If you've tried all of the above and still have issues:
1. **Check the Code**: Review the latest version on Forgejo
- [Forgejo Repository](https://git.jezzahehn.com/KrustyPlanet/trustcafe-api-wrapper)
1. **Check the Code**: Review the latest version on GitLab
- [GitLab Repository](https://gitlab.com/trustcafe/trustcafe-api-wrapper)
2. **Check TrustCafé Status**: Verify services are up
- [Production](https://trustcafe.io)