Skip to content

Conversation

@qtpi-bonding
Copy link
Contributor

@qtpi-bonding qtpi-bonding commented May 6, 2025

Summary by CodeRabbit

  • Documentation
    • Expanded documentation for the POST /public/v1/posts API endpoint with detailed schema tables for request payloads and provider-specific settings.
    • Added a complete example curl command for making requests.
    • Updated the response example to show an array of objects with postId and integration fields.

@vercel
Copy link

vercel bot commented May 6, 2025

@qtpi-bonding is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented May 6, 2025

Walkthrough

The documentation for the POST /public/v1/posts API endpoint has been extensively updated. Detailed schema tables now describe the request payload structure, including nested objects and provider-specific settings. The response example has been changed to an array format. An example curl command was added. No code or signature changes occurred.

Changes

File(s) Change Summary
pages/public-api.mdx Expanded documentation for POST /public/v1/posts with detailed schema tables, example payloads, provider-specific settings, and updated response example.

Poem

In the garden of docs, new tables grow,
With schemas and fields all in a row.
Curl commands hop in, clear and bright,
Provider settings detailed just right.
An array of responses, neat and spry—
The API’s clearer, oh my!
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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: Clarify group property description
The group field is described simply as “Group name.” Consider expanding this to explain how grouping affects batch operations (for example, that all posts with the same group value will be created/updated together).


179-185: Consider pluralizing image to images
The Post Value table defines image: MediaDto[], but since it’s an array, naming it images would improve clarity and consistency with array conventions.


197-210: Inconsistent provider DTO naming in Settings table
Most provider settings types end with SettingsDto, but DribbbleDto and TikTokDto omit “Settings.” For consistency and discoverability, consider renaming them to DribbbleSettingsDto and TikTokSettingsDto.

🧰 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

📥 Commits

Reviewing files that changed from the base of the PR and between 76200a4 and ec2f693.

📒 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 both value and label. No changes needed.

Comment on lines 159 to +170
```
### 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 |

Copy link

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 || true

Length 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.

Suggested change
```
### 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": []
}

@egelhaus egelhaus merged commit 5a6bcd2 into gitroomhq:main May 6, 2025
2 of 3 checks passed
This was linked to issues May 6, 2025
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.

Feedback for “Public API” Feedback for “Public API”

2 participants