2872ae2b97
#19 Per-article cross-posting: Content plugin injects "Cross-Posting" fieldset into article editor via onContentPrepareForm. Dynamic checkbox list of all enabled services. Skip toggle. System plugin reads article attribs for mokojoomcross_services (array of service IDs) and mokojoomcross_skip (boolean). Unchecked = post to all. #20 Analytics dashboard: Posts-by-service breakdown table with success rate column (color-coded). Top cross-posted articles list. DashboardModel methods: getServiceBreakdown(), getDailyTrend(), getTopArticles(). #21 OAuth flows: OAuthHelper with authorize URL generation (Facebook, LinkedIn, Twitter), PKCE for Twitter, code→token exchange, token storage in service credentials. OauthController with authorize and callback actions. Reads client ID/secret from plugin params. #22 Wiki documentation: Services guide (all 9 platforms, default vs custom mode), REST API reference, Message Templates guide with examples per platform, Troubleshooting guide. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
REST API
MokoJoomCross includes a WebServices plugin that provides REST API endpoints via Joomla's API application.
Authentication
All endpoints require a Joomla API token. Generate one in Users → Manage → [User] → API Tokens.
Include the token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
Base URL
https://yoursite.com/api/index.php/v1/mokojoomcross/
Endpoints
Posts
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/mokojoomcross/posts |
List all cross-posts |
| GET | /v1/mokojoomcross/posts/:id |
Get single post details |
| POST | /v1/mokojoomcross/posts |
Create a cross-post entry |
| DELETE | /v1/mokojoomcross/posts/:id |
Delete a post |
Services
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/mokojoomcross/services |
List connected services |
| GET | /v1/mokojoomcross/services/:id |
Get service details |
Example
# List all posts
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://yoursite.com/api/index.php/v1/mokojoomcross/posts
# List services
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://yoursite.com/api/index.php/v1/mokojoomcross/services
Filtering
Posts support query parameters:
filter[status]=posted— Filter by status (queued, posting, posted, failed, scheduled)filter[service_id]=5— Filter by servicepage[limit]=20— Pagination limitpage[offset]=0— Pagination offset