- 
                Notifications
    You must be signed in to change notification settings 
- Fork 55
Update public-api.mdx #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @qtpi-bonding is attempting to deploy a commit to the Listinai Team on Vercel. A member of the Team first needs to authorize it. | 
| WalkthroughThe documentation for the  Changes
 Poem
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File ( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
pages/public-api.mdx (5)
171-178: Clarifygroupproperty description
Thegroupfield is described simply as “Group name.” Consider expanding this to explain how grouping affects batch operations (for example, that all posts with the samegroupvalue will be created/updated together).
179-185: Consider pluralizingimagetoimages
The Post Value table definesimage: MediaDto[], but since it’s an array, naming itimageswould improve clarity and consistency with array conventions.
197-210: Inconsistent provider DTO naming in Settings table
Most provider settings types end withSettingsDto, butDribbbleDtoandTikTokDtoomit “Settings.” For consistency and discoverability, consider renaming them toDribbbleSettingsDtoandTikTokSettingsDto.🧰 Tools
🪛 LanguageTool
[grammar] ~208-~208: Did you mean “TikTok” (= social networking app)?
Context: ...ribbbleDto | No | Dribbble settings | | tiktok | TikTokDto | No | TikTok settings | | ...(TIK_TOK)
241-275: Improve readability of the example curl payload
Embedding the full JSON in a single-quoted-d '…'block can be hard to maintain. You might switch to a heredoc approach, e.g.:curl -X POST https://POSTIZ_URL/public/v1/posts \ -H 'Authorization: API_KEY' \ -H 'Content-Type: application/json' \ --data @- << 'EOF' { "type": "draft", "order": "", "shortLink": true, "inter": 0, "date": "2025-05-07T12:00:00.000Z", "tags": [ { "value": "", "label": "" } ], "posts": [ /* ... */ ] } EOF
281-282: Pretty-print the sample JSON response
The response example is on a single line. For better readability, expand it into a multi-line, indented JSON block:[ { "postId": "POST_ID", "integration": "INTEGRATION_ID" } ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- pages/public-api.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
pages/public-api.mdx
[grammar] ~208-~208: Did you mean “TikTok” (= social networking app)?
Context: ...ribbbleDto | No | Dribbble settings | | tiktok | TikTokDto | No | TikTok settings | | ...
(TIK_TOK)
🔇 Additional comments (2)
pages/public-api.mdx (2)
186-190: Integration schema is clear
The Integration table accurately describes the fields returned by the API. Nice work.
191-196: Tags schema looks good
The Tags table correctly defines bothvalueandlabel. No changes needed.
| ``` | ||
| ### Request | ||
| | Property | Type | Required | Description | | ||
| | --- | --- | --- | --- | | ||
| | type | `draft` \| `schedule` \| `now` | Yes | Type of post creation | | ||
| | order | string | No | Order of posts | | ||
| | shortLink | boolean | Yes | Whether to use short link | | ||
| | inter | number | No | Interval | | ||
| | date | string (Date) | Yes | Date of post | | ||
| | tags | Tags[] | Yes | Array of tags | | ||
| | posts | Post[] | Yes (if type !== 'draft') | Array of posts | | ||
|  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Inconsistent request payload example vs. schema table
The example JSON shown earlier (lines 133–158) does not include the properties order, shortLink, inter, or tags that are documented here. This mismatch can confuse integrators. Please align the sample payload and the schema table, and clarify the abbreviation inter (e.g., rename to interval if that matches the actual field).
🏁 Script executed:
#!/bin/bash
# Extract example JSON snippet (lines 133-158)
echo "=== Example JSON (lines 133-158) ==="
sed -n '133,158p' pages/public-api.mdx
echo
# Search for 'inter' vs 'interval' usage in the document
echo "=== Occurrences of 'inter' or 'interval' ==="
grep -n -E "inter|interval" pages/public-api.mdx || trueLength of output: 1020
Align example payload with schema table
The JSON example (lines 133–158) only shows type, date, and posts, but the schema table (lines 159–170) documents four additional properties—order, shortLink, inter, and tags—which leads to confusion. Please update either the example or the table so they match, and clarify the inter field (e.g., rename to interval if that’s the actual property name).
Locations to address:
- pages/public-api.mdx: example JSON at lines 133–158
- pages/public-api.mdx: request schema table at lines 159–170
Suggested diff snippet for the example JSON:
 {
   "type": "draft|schedule|now",
   "date": "2024-12-14T08:18:54.274Z",
+  "order": "string",
+  "shortLink": true,
+  "inter": 60,        // consider renaming to `interval`
+  "tags": ["tag1","tag2"],
   "posts": [ … ]
 }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| ### Request | |
| | Property | Type | Required | Description | | |
| | --- | --- | --- | --- | | |
| | type | `draft` \| `schedule` \| `now` | Yes | Type of post creation | | |
| | order | string | No | Order of posts | | |
| | shortLink | boolean | Yes | Whether to use short link | | |
| | inter | number | No | Interval | | |
| | date | string (Date) | Yes | Date of post | | |
| | tags | Tags[] | Yes | Array of tags | | |
| | posts | Post[] | Yes (if type !== 'draft') | Array of posts | | |
| { | |
| "type": "draft|schedule|now", | |
| "date": "2024-12-14T08:18:54.274Z", | |
| "order": "string", | |
| "shortLink": true, | |
| "inter": 60, // consider renaming to `interval` | |
| "tags": ["tag1","tag2"], | |
| "posts": [ … ] | |
| } | 
Summary by CodeRabbit
POST /public/v1/postsAPI endpoint with detailed schema tables for request payloads and provider-specific settings.curlcommand for making requests.postIdandintegrationfields.