hermoso-compat 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hermoso_compat-0.1.0/LICENSE +21 -0
- hermoso_compat-0.1.0/PKG-INFO +254 -0
- hermoso_compat-0.1.0/README.md +234 -0
- hermoso_compat-0.1.0/hermoso_compat/__init__.py +13 -0
- hermoso_compat-0.1.0/hermoso_compat/_core.py +302 -0
- hermoso_compat-0.1.0/hermoso_compat/_zernio_rest.py +953 -0
- hermoso_compat-0.1.0/hermoso_compat/ayrshare.py +885 -0
- hermoso_compat-0.1.0/hermoso_compat/zernio.py +329 -0
- hermoso_compat-0.1.0/hermoso_compat.egg-info/PKG-INFO +254 -0
- hermoso_compat-0.1.0/hermoso_compat.egg-info/SOURCES.txt +13 -0
- hermoso_compat-0.1.0/hermoso_compat.egg-info/dependency_links.txt +1 -0
- hermoso_compat-0.1.0/hermoso_compat.egg-info/top_level.txt +1 -0
- hermoso_compat-0.1.0/pyproject.toml +29 -0
- hermoso_compat-0.1.0/setup.cfg +4 -0
- hermoso_compat-0.1.0/tests/test_compat.py +163 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hermoso
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hermoso-compat
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unofficial drop-in compatibility layers for the Ayrshare and Zernio Python SDKs that run on Hermoso's API. Change one import, keep your code. Not affiliated with Ayrshare or Zernio.
|
|
5
|
+
Author-email: Hermoso <hello@hermoso.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://hermoso.ai/docs/sdks/
|
|
8
|
+
Project-URL: Source, https://github.com/hermoso-ai/hermoso-compat
|
|
9
|
+
Project-URL: Issues, https://github.com/hermoso-ai/hermoso-compat/issues
|
|
10
|
+
Keywords: hermoso,social media api,ayrshare alternative,zernio alternative,drop-in replacement,schedule posts,instagram,tiktok,linkedin
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Internet
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# hermoso-compat
|
|
22
|
+
|
|
23
|
+
**Unofficial** drop-in compatibility layers that run code written for other social-posting SDKs on
|
|
24
|
+
[Hermoso](https://hermoso.ai)'s API. Change one import and your API key; the method names and argument shapes stay
|
|
25
|
+
the same.
|
|
26
|
+
|
|
27
|
+
| You use | Node | Python |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Ayrshare (`social-media-api` / `social-post-api`) | `@hermoso/compat/ayrshare` | `hermoso_compat.ayrshare` |
|
|
30
|
+
| Zernio (`@zernio/node` / `zernio-sdk`) | `@hermoso/compat/zernio` | `hermoso_compat.zernio` |
|
|
31
|
+
| Postiz (`@postiz/node`) | `@hermoso/compat/postiz` | (Postiz ships no Python SDK) |
|
|
32
|
+
|
|
33
|
+
> **Not affiliated.** This package is written and maintained by Hermoso. It is not affiliated with, endorsed by or
|
|
34
|
+
> sponsored by Ayrshare, Zernio or Postiz. Their names appear only to say which SDK each layer is compatible with;
|
|
35
|
+
> all trademarks belong to their owners.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @hermoso/compat # Node 18.17+
|
|
39
|
+
pip install hermoso-compat # Python 3.10+, no dependencies
|
|
40
|
+
# until the PyPI release is up: pip install "git+https://github.com/hermoso-ai/hermoso-compat#subdirectory=python"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Get a Hermoso API key at [app.hermoso.ai](https://app.hermoso.ai) (the **API, MCP & CLI** tab) and connect your
|
|
44
|
+
channels there, or hand your customers a connect link (`generateJWT` / `getConnectUrl` below). Publishing and
|
|
45
|
+
scheduling cost no Hermoso credits.
|
|
46
|
+
|
|
47
|
+
## Switch in one line
|
|
48
|
+
|
|
49
|
+
**Ayrshare, Node**
|
|
50
|
+
|
|
51
|
+
```diff
|
|
52
|
+
- import SocialMediaAPI from 'social-media-api';
|
|
53
|
+
+ import SocialMediaAPI from '@hermoso/compat/ayrshare';
|
|
54
|
+
|
|
55
|
+
const social = new SocialMediaAPI(process.env.HERMOSO_API_KEY);
|
|
56
|
+
await social.post({ post: 'Hello', platforms: ['twitter', 'linkedin'], mediaUrls: ['https://…/a.png'] });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Ayrshare, Python**
|
|
60
|
+
|
|
61
|
+
```diff
|
|
62
|
+
- from ayrshare import SocialPost
|
|
63
|
+
+ from hermoso_compat.ayrshare import SocialPost
|
|
64
|
+
|
|
65
|
+
social = SocialPost(os.environ["HERMOSO_API_KEY"])
|
|
66
|
+
social.post({"post": "Hello", "platforms": ["twitter", "linkedin"]})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Zernio, Node**
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
- import Zernio from '@zernio/node';
|
|
73
|
+
+ import Zernio from '@hermoso/compat/zernio';
|
|
74
|
+
|
|
75
|
+
const zernio = new Zernio({ apiKey: process.env.HERMOSO_API_KEY });
|
|
76
|
+
const { data } = await zernio.posts.createPost({ body: { content: 'Hello', platforms: [{ platform: 'twitter', accountId: 'x' }], publishNow: true } });
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Zernio, Python**
|
|
80
|
+
|
|
81
|
+
```diff
|
|
82
|
+
- from zernio import Zernio
|
|
83
|
+
+ from hermoso_compat.zernio import Zernio
|
|
84
|
+
|
|
85
|
+
client = Zernio(api_key=os.environ["HERMOSO_API_KEY"])
|
|
86
|
+
client.posts.create(content="Hello", platforms=[{"platform": "twitter", "accountId": "x"}], publish_now=True)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Postiz, Node**
|
|
90
|
+
|
|
91
|
+
```diff
|
|
92
|
+
- import Postiz from '@postiz/node';
|
|
93
|
+
+ import Postiz from '@hermoso/compat/postiz';
|
|
94
|
+
|
|
95
|
+
const postiz = new Postiz(process.env.HERMOSO_API_KEY);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## How the concepts map
|
|
99
|
+
|
|
100
|
+
| Their word | Hermoso | Notes |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| Ayrshare Profile-Key, Zernio `profileId` | a brand id (`GET /v1/brands`), sent as `X-Hermoso-User` | A brand another account shared with you is `<brandId>:<ownerAccountId>`; `getProfiles` / `listProfiles` return it in that form. |
|
|
103
|
+
| Zernio `accountId`, Postiz integration `id` | `<channel>` or `<channel>:<account>` | `listAccounts` / `integrations` list them. The account part is a Facebook Page, LinkedIn Page, Pinterest board or Business location id, or one account of a channel that holds several (TikTok, X, YouTube, Threads, Bluesky, Telegram). |
|
|
104
|
+
| `twitter` | `x` | |
|
|
105
|
+
| `gmb`, `googlebusiness` | `google_business` | |
|
|
106
|
+
| A scheduled post's id | a Hermoso post id (`job_…`) | |
|
|
107
|
+
| Ayrshare auto-schedule, Zernio queue | posting queues (`manage_post_queues`) | Zernio's per-weekday slots are kept exactly. |
|
|
108
|
+
| Webhooks | the brand's webhook alert channel | One webhook URL per brand. Signed the Standard Webhooks way (`webhook-id`, `webhook-timestamp`, `webhook-signature`); the secret is returned when you first register. Event names are translated both ways; an event Hermoso does not send is listed in `warnings`. |
|
|
109
|
+
| Ayrshare `generateJWT`, Zernio `getConnectUrl` | a connect link (`POST /v1/connect-links`) | Hermoso links connect one platform each, so pass `allowedSocial`. |
|
|
110
|
+
|
|
111
|
+
**Behaviour you should know about**
|
|
112
|
+
|
|
113
|
+
- **Publish now waits for the result**, like Ayrshare and Zernio do, up to 2 minutes (Ayrshare) or 5 (Zernio):
|
|
114
|
+
options `waitForPublish` / `publishTimeoutMs` (Node) and `wait_for_publish` / `publish_timeout` (Python).
|
|
115
|
+
- **Media URLs are copied to Hermoso's storage** before posting, so a link that expires does not break a scheduled
|
|
116
|
+
post. Turn it off with `rehostMedia: false`.
|
|
117
|
+
- **Errors keep each SDK's style.** The Ayrshare layer returns `{ status: 'error', code, message }` instead of
|
|
118
|
+
throwing, as Ayrshare's SDK does; the Zernio layer throws `ZernioApiError` and its subclasses. Hermoso's own `code`
|
|
119
|
+
(for example `channel_not_connected`) is passed through.
|
|
120
|
+
- **A method this layer does not serve throws `HermosoUnsupportedError`** (in every layer, Ayrshare included), and
|
|
121
|
+
its message names the Hermoso tool that does the job. Every Hermoso tool is one call away:
|
|
122
|
+
`client.callTool(name, args)` (Node) or `client.call_tool(name, args)` (Python), which is `POST /v1/tools/{name}`.
|
|
123
|
+
The list: `GET https://app.hermoso.ai/v1/tools`.
|
|
124
|
+
- **X needs no keys of your own.** Ayrshare's `setTwitterByo` is accepted and ignored; Hermoso posts through the X
|
|
125
|
+
account the brand connected.
|
|
126
|
+
- **Deleting a published post** is each platform's own delete in Hermoso. `delete` / `deletePost` cancel a post that
|
|
127
|
+
has not gone out yet; for one that has, the error names the tool per platform (`delete_x_post`, `manage_meta_post`, …).
|
|
128
|
+
|
|
129
|
+
## Method coverage
|
|
130
|
+
|
|
131
|
+
✅ served · ◐ served with a difference noted · ✖ throws `HermosoUnsupportedError` naming the tool
|
|
132
|
+
|
|
133
|
+
### Ayrshare
|
|
134
|
+
|
|
135
|
+
Node names first; the Python name follows where it differs.
|
|
136
|
+
|
|
137
|
+
| Method | | Hermoso |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `post` | ✅ | `POST /v1/posts`. `profileKeys` posts to each brand. Platform options mapped: YouTube, Instagram, Facebook, LinkedIn, Pinterest, TikTok, X, Google Business, Telegram, Threads, Bluesky. `requiresApproval` and `randomPost` ✖. |
|
|
140
|
+
| `delete` | ◐ | Cancels a scheduled post (`id`, `bulk`, `deleteAllScheduled`). A published one: the error names each platform's delete tool. |
|
|
141
|
+
| `updatePost` | ✅ | `PATCH /v1/posts/{id}` (time, text, media, platforms) |
|
|
142
|
+
| `retryPost` | ✅ | `retry_scheduled` |
|
|
143
|
+
| `getPost` | ✅ | `GET /v1/posts/{id}` |
|
|
144
|
+
| `history` | ✅ | `GET /v1/posts`; `history({ platform })` reads what is on that channel (`list_published_posts`) |
|
|
145
|
+
| `media` | ✅ | `GET /v1/library` |
|
|
146
|
+
| `verifyMediaExists` | ✅ | a HEAD request from your process |
|
|
147
|
+
| `mediaUploadUrl` | ◐ | `upload_file`. PUT the bytes to `uploadUrl`; its response body holds the final `url` (`accessUrl` is null). |
|
|
148
|
+
| `upload` | ✅ | `POST /v1/media` |
|
|
149
|
+
| `analyticsPost` | ✅ | the post's measured numbers (`list_published_posts`) |
|
|
150
|
+
| `analyticsSocial` | ✅ | `GET /v1/analytics/follower-history` |
|
|
151
|
+
| `user` | ✅ | brands, connections, credits |
|
|
152
|
+
| `createProfile` | ✅ | `create_brand` |
|
|
153
|
+
| `updateProfile` | ✅ | `update_brand` (sets the brand's name) |
|
|
154
|
+
| `getProfiles` | ✅ | `GET /v1/brands` |
|
|
155
|
+
| `deleteProfile` | ✖ | `delete_brand` (irreversible, confirm-gated: use MCP or the app) |
|
|
156
|
+
| `generateJWT` | ✅ | `POST /v1/connect-links`, one per `allowedSocial` platform |
|
|
157
|
+
| `unlinkSocial` | ✅ | `DELETE /v1/connections/{provider}` |
|
|
158
|
+
| `postComment`, `getComments`, `replyComment`, `deleteComments` | ✅ | Facebook, Instagram, YouTube (no top-level comment), TikTok, LinkedIn Pages, Threads |
|
|
159
|
+
| `setAutoSchedule`, `deleteAutoSchedule`, `listAutoSchedule` | ✅ | `manage_post_queues` |
|
|
160
|
+
| `registerWebhook`, `unregisterWebhook`, `listWebhooks` | ✅ | actions `social`, `scheduled`, `messages`, `comments`, `reviews`, `mentions` |
|
|
161
|
+
| `generatePost`, `generateRewrite`, `generateTranslation` (+ Python `generateSentiment`) | ✅ | `generate_text` (billed in Hermoso credits) |
|
|
162
|
+
| `generateTranscription` | ✅ | `analyze_video` (billed in Hermoso credits) |
|
|
163
|
+
| `reviews`, `review`, `replyReview` / `reviewReply`, `deleteReplyReview` / `deleteReviewReply` | ✅ | Google Business Profile and Facebook Page reviews |
|
|
164
|
+
| `setProfileKey`, `setTwitterByo` / `set_twitter_byo`, `clearTwitterByo` / `clear_twitter_byo` | ✅ | |
|
|
165
|
+
| `feedAdd` / `addFeed`, `feedGet` / `getFeeds`, `feedUpdate` / `updateFeed`, `feedDelete` / `deleteFeed` | ✖ | `set_post_refill` (autopilot posting) |
|
|
166
|
+
| `shorten`, `shortLink`, `shortLinkAnalytics`, `analyticsLinks` | ✖ | `set_tracking_links` |
|
|
167
|
+
| `generateAltText`, `autoHashtags` | ✖ | `generate_text` |
|
|
168
|
+
| `recommendHashtags` | ✖ | `tiktok_hashtag_suggestions` |
|
|
169
|
+
| `checkBannedHashtags` | ✖ | `check_ad_policy` |
|
|
170
|
+
| `mediaMeta` | ✖ | `analyze_video` |
|
|
171
|
+
| `resizeImage` | ✖ | `resize_ad` |
|
|
172
|
+
| `getBrandByUser` | ✖ | `fetch_social_data` |
|
|
173
|
+
|
|
174
|
+
### Zernio
|
|
175
|
+
|
|
176
|
+
Node `namespace.method`; Python uses the same namespace with snake_case names (`posts.create_post`), plus the short
|
|
177
|
+
names (`posts.create`, `posts.list`, `posts.get`, `posts.update`, `posts.delete`, `posts.retry`, `accounts.list`,
|
|
178
|
+
`profiles.list`, `queue.get_slots`, `queue.update_slots`, `queue.delete_slots`, `analytics.get`, `media.upload`,
|
|
179
|
+
`media.upload_bytes`) and every `a…` async twin.
|
|
180
|
+
|
|
181
|
+
| Method | | Hermoso |
|
|
182
|
+
|---|---|---|
|
|
183
|
+
| `posts.createPost` | ◐ | `POST /v1/posts`. `publishNow`, `scheduledFor`, `queuedFromProfile`/`queueId`, `dryRun` (validated against each channel's limits, nothing created), `customContent`, `mediaItems`, `platformSpecificData`, `tiktokSettings`, `Idempotency-Key`. Drafts (`isDraft`, or none of the three timings) ✖ `schedule_post`. `customMedia` and per-platform `scheduledFor` are reported in `warnings`. |
|
|
184
|
+
| `posts.listPosts`, `getPost`, `updatePost`, `deletePost`, `retryPost` | ✅ | `/v1/posts`, `retry_scheduled` |
|
|
185
|
+
| `posts.editPost`, `pinPost`, `unpinPost`, `unpublishPost` | ✖ | `manage_meta_post` (and each platform's own tool) |
|
|
186
|
+
| `posts.bulkUploadPosts` | ✖ | `import_posts_csv` |
|
|
187
|
+
| `profiles.listProfiles`, `createProfile`, `getProfile`, `updateProfile` | ✅ | `/v1/brands`, `create_brand`, `update_brand` |
|
|
188
|
+
| `profiles.deleteProfile` | ✖ | `delete_brand` |
|
|
189
|
+
| `accounts.listAccounts`, `getAccount`, `deleteAccount`, `getAllAccountsHealth`, `getAccountHealth`, `getFollowerStats`, `getAccountPosts` | ✅ | `/v1/channels`, `/v1/connections`, follower history, `list_published_posts` |
|
|
190
|
+
| `accounts.getGoogleBusinessReviews`, `replyToGoogleBusinessReview`, `deleteGoogleBusinessReviewReply` | ✅ | Google Business Profile tools |
|
|
191
|
+
| `media.getMediaPresignedUrl` | ◐ | `upload_file`. `publicUrl` is null: the PUT's response body holds the URL. Python `media.upload(path)` / `upload_bytes(...)` return `publicUrl` directly. |
|
|
192
|
+
| `queue.listQueueSlots`, `createQueueSlot`, `updateQueueSlot`, `deleteQueueSlot` | ✅ | `manage_post_queues` |
|
|
193
|
+
| `webhooks.getWebhookSettings`, `createWebhookSettings`, `updateWebhookSettings`, `deleteWebhookSettings`, `testWebhook`, `getWebhookLogs`, `redeliverWebhookEvent` | ✅ | the webhook alert channel |
|
|
194
|
+
| `connect.getConnectUrl`, `createPlatformInvite` | ✅ | `POST /v1/connect-links` |
|
|
195
|
+
| `analytics.getAnalytics`, `getBestTimeToPost`, `getContentDecay`, `getPostingFrequency`, `getInstagramFollowerHistory` | ✅ | `list_published_posts`, `/v1/analytics/*` |
|
|
196
|
+
| `users.getCurrentUser`, `usage.getUsageStats`, `usage.getUsage` | ✅ | `/v1/brands`, `/v1/account/email`, `/v1/credits` |
|
|
197
|
+
| `comments.getInboxPostComments`, `replyToInboxPost`, `deleteInboxComment`, `hideInboxComment`, `unhideInboxComment`, `sendPrivateReplyToComment` | ✅ | per-platform comment tools |
|
|
198
|
+
| `reviews.listInboxReviews`, `replyToInboxReview`, `deleteInboxReviewReply` | ✅ | Google Business Profile and Facebook Page reviews |
|
|
199
|
+
| `validate.validatePostLength`, `validatePost` | ✅ | each channel's limits from `/v1/channels` |
|
|
200
|
+
| Every other method, in any namespace (ads, WhatsApp, SMS, email, CRM, …) | ✖ | The error names the closest tool where there is one (`create_meta_campaign`, `send_whatsapp_message`, `send_sms`, `list_inbox`, …), else a `/v1/tools?search=` link. |
|
|
201
|
+
|
|
202
|
+
### Postiz
|
|
203
|
+
|
|
204
|
+
| Method | | Hermoso |
|
|
205
|
+
|---|---|---|
|
|
206
|
+
| `post` | ◐ | `POST /v1/posts`, one Hermoso post per entry in `posts[]`. Extra `value[]` items become an X thread, or the first comment elsewhere. `type: 'draft'` ✖ `schedule_post`. |
|
|
207
|
+
| `postList` | ✅ | `GET /v1/posts` (`startDate`/`endDate`, or `display` week/month) |
|
|
208
|
+
| `upload` | ✅ | `POST /v1/media` |
|
|
209
|
+
| `integrations` | ✅ | `/v1/channels` + `/v1/connections` |
|
|
210
|
+
| `deletePost` | ✅ | `DELETE /v1/posts/{id}` (resolves with a Response-like object, as the original does) |
|
|
211
|
+
|
|
212
|
+
## Zernio REST → Hermoso REST
|
|
213
|
+
|
|
214
|
+
If you call Zernio's HTTP API directly, this is where each call goes. Hermoso's base URL is
|
|
215
|
+
`https://app.hermoso.ai`, auth is `Authorization: Bearer hmk_…`, and the brand is the `X-Hermoso-User` header.
|
|
216
|
+
Responses are Hermoso's own shapes (documented at [hermoso.ai/docs/api](https://hermoso.ai/docs/api/)); to keep
|
|
217
|
+
Zernio's shapes, run the call through this package: `zernio.request('POST', '/v1/posts', { body })`.
|
|
218
|
+
|
|
219
|
+
| Zernio | Hermoso |
|
|
220
|
+
|---|---|
|
|
221
|
+
| `POST /v1/posts` | `POST /v1/posts` (`content`→`caption`, `platforms[].platform`→`channels[]`, `scheduledFor`→`scheduled_at`, `customContent`→`captions_by_channel`, `mediaItems`→`media`; omit `scheduled_at` to publish now) |
|
|
222
|
+
| `GET /v1/posts`, `GET/PUT/DELETE /v1/posts/{id}` | `GET /v1/posts`, `GET/PATCH/DELETE /v1/posts/{id}` |
|
|
223
|
+
| `POST /v1/posts/{id}/retry` | `POST /v1/tools/retry_scheduled` `{"id"}` |
|
|
224
|
+
| `GET /v1/accounts` | `GET /v1/channels` (`connected: true`) and `GET /v1/connections` |
|
|
225
|
+
| `DELETE /v1/accounts/{id}` | `DELETE /v1/connections/{provider}?account=` |
|
|
226
|
+
| `GET /v1/profiles`, `POST /v1/profiles` | `GET /v1/brands`, `POST /v1/tools/create_brand` |
|
|
227
|
+
| `POST /v1/media/presign` | `POST /v1/media` (bytes or `?url=`), or `POST /v1/tools/upload_file` `{"getUploadUrl": true}` |
|
|
228
|
+
| `GET/POST/PUT/DELETE /v1/queue/slots` | `POST /v1/tools/manage_post_queues` (`action` list / save / delete) |
|
|
229
|
+
| `GET/POST/PUT/DELETE /v1/webhooks/settings` | `POST /v1/tools/connect_connector` `{"provider":"webhook","fields":{"webhookUrl"}}`, `set_alert_events`, `list_alert_settings`, `disconnect_connector` |
|
|
230
|
+
| `POST /v1/webhooks/test`, `GET /v1/webhooks/logs`, `POST /v1/webhooks/logs/redeliver` | `send_test_alert`, `list_alert_settings` (`deliveries`), `redeliver_webhook` |
|
|
231
|
+
| `GET /v1/connect/{platform}` | `POST /v1/connect-links` `{"provider"}` |
|
|
232
|
+
| `GET /v1/analytics` | `POST /v1/tools/list_published_posts` |
|
|
233
|
+
| `GET /v1/analytics/best-time`, `/content-decay`, `/posting-frequency` | same paths under `/v1/analytics/` |
|
|
234
|
+
| `GET /v1/accounts/follower-stats` | `GET /v1/analytics/follower-history` |
|
|
235
|
+
| `GET /v1/users/me`, `GET /v1/usage-stats` | `GET /v1/brands`, `GET /v1/account/email`, `GET /v1/credits` |
|
|
236
|
+
| `/v1/inbox/comments/…`, `/v1/inbox/reviews/…` | the per-platform comment and review tools (`list_meta_comments`, `reply_to_meta_comment`, `list_google_business_reviews`, …) |
|
|
237
|
+
| anything else | `GET /v1/tools?search=<what you need>` |
|
|
238
|
+
|
|
239
|
+
## Beyond what you had
|
|
240
|
+
|
|
241
|
+
The same key reaches everything else Hermoso does: generate image and video ads, research competitors' ads, run paid
|
|
242
|
+
campaigns, read analytics, and call every tool in Hermoso's catalog. Use the official SDKs for that:
|
|
243
|
+
[`@hermoso/sdk`](https://www.npmjs.com/package/@hermoso/sdk), [`hermoso`](https://pypi.org/project/hermoso/), and
|
|
244
|
+
[more languages](https://hermoso.ai/docs/sdks/).
|
|
245
|
+
|
|
246
|
+
## How this was tested
|
|
247
|
+
|
|
248
|
+
`npm test` (Node) and `python -m unittest discover -s python/tests` run each layer against a stand-in for the API.
|
|
249
|
+
Before each release the layers are also run end to end against a real Hermoso server with a brand whose only
|
|
250
|
+
channel cannot publish, so publish calls fail cleanly and nothing is posted anywhere public.
|
|
251
|
+
|
|
252
|
+
## License
|
|
253
|
+
|
|
254
|
+
MIT. Issues and pull requests are welcome.
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# hermoso-compat
|
|
2
|
+
|
|
3
|
+
**Unofficial** drop-in compatibility layers that run code written for other social-posting SDKs on
|
|
4
|
+
[Hermoso](https://hermoso.ai)'s API. Change one import and your API key; the method names and argument shapes stay
|
|
5
|
+
the same.
|
|
6
|
+
|
|
7
|
+
| You use | Node | Python |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Ayrshare (`social-media-api` / `social-post-api`) | `@hermoso/compat/ayrshare` | `hermoso_compat.ayrshare` |
|
|
10
|
+
| Zernio (`@zernio/node` / `zernio-sdk`) | `@hermoso/compat/zernio` | `hermoso_compat.zernio` |
|
|
11
|
+
| Postiz (`@postiz/node`) | `@hermoso/compat/postiz` | (Postiz ships no Python SDK) |
|
|
12
|
+
|
|
13
|
+
> **Not affiliated.** This package is written and maintained by Hermoso. It is not affiliated with, endorsed by or
|
|
14
|
+
> sponsored by Ayrshare, Zernio or Postiz. Their names appear only to say which SDK each layer is compatible with;
|
|
15
|
+
> all trademarks belong to their owners.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @hermoso/compat # Node 18.17+
|
|
19
|
+
pip install hermoso-compat # Python 3.10+, no dependencies
|
|
20
|
+
# until the PyPI release is up: pip install "git+https://github.com/hermoso-ai/hermoso-compat#subdirectory=python"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Get a Hermoso API key at [app.hermoso.ai](https://app.hermoso.ai) (the **API, MCP & CLI** tab) and connect your
|
|
24
|
+
channels there, or hand your customers a connect link (`generateJWT` / `getConnectUrl` below). Publishing and
|
|
25
|
+
scheduling cost no Hermoso credits.
|
|
26
|
+
|
|
27
|
+
## Switch in one line
|
|
28
|
+
|
|
29
|
+
**Ayrshare, Node**
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
- import SocialMediaAPI from 'social-media-api';
|
|
33
|
+
+ import SocialMediaAPI from '@hermoso/compat/ayrshare';
|
|
34
|
+
|
|
35
|
+
const social = new SocialMediaAPI(process.env.HERMOSO_API_KEY);
|
|
36
|
+
await social.post({ post: 'Hello', platforms: ['twitter', 'linkedin'], mediaUrls: ['https://…/a.png'] });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Ayrshare, Python**
|
|
40
|
+
|
|
41
|
+
```diff
|
|
42
|
+
- from ayrshare import SocialPost
|
|
43
|
+
+ from hermoso_compat.ayrshare import SocialPost
|
|
44
|
+
|
|
45
|
+
social = SocialPost(os.environ["HERMOSO_API_KEY"])
|
|
46
|
+
social.post({"post": "Hello", "platforms": ["twitter", "linkedin"]})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Zernio, Node**
|
|
50
|
+
|
|
51
|
+
```diff
|
|
52
|
+
- import Zernio from '@zernio/node';
|
|
53
|
+
+ import Zernio from '@hermoso/compat/zernio';
|
|
54
|
+
|
|
55
|
+
const zernio = new Zernio({ apiKey: process.env.HERMOSO_API_KEY });
|
|
56
|
+
const { data } = await zernio.posts.createPost({ body: { content: 'Hello', platforms: [{ platform: 'twitter', accountId: 'x' }], publishNow: true } });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Zernio, Python**
|
|
60
|
+
|
|
61
|
+
```diff
|
|
62
|
+
- from zernio import Zernio
|
|
63
|
+
+ from hermoso_compat.zernio import Zernio
|
|
64
|
+
|
|
65
|
+
client = Zernio(api_key=os.environ["HERMOSO_API_KEY"])
|
|
66
|
+
client.posts.create(content="Hello", platforms=[{"platform": "twitter", "accountId": "x"}], publish_now=True)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Postiz, Node**
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
- import Postiz from '@postiz/node';
|
|
73
|
+
+ import Postiz from '@hermoso/compat/postiz';
|
|
74
|
+
|
|
75
|
+
const postiz = new Postiz(process.env.HERMOSO_API_KEY);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## How the concepts map
|
|
79
|
+
|
|
80
|
+
| Their word | Hermoso | Notes |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| Ayrshare Profile-Key, Zernio `profileId` | a brand id (`GET /v1/brands`), sent as `X-Hermoso-User` | A brand another account shared with you is `<brandId>:<ownerAccountId>`; `getProfiles` / `listProfiles` return it in that form. |
|
|
83
|
+
| Zernio `accountId`, Postiz integration `id` | `<channel>` or `<channel>:<account>` | `listAccounts` / `integrations` list them. The account part is a Facebook Page, LinkedIn Page, Pinterest board or Business location id, or one account of a channel that holds several (TikTok, X, YouTube, Threads, Bluesky, Telegram). |
|
|
84
|
+
| `twitter` | `x` | |
|
|
85
|
+
| `gmb`, `googlebusiness` | `google_business` | |
|
|
86
|
+
| A scheduled post's id | a Hermoso post id (`job_…`) | |
|
|
87
|
+
| Ayrshare auto-schedule, Zernio queue | posting queues (`manage_post_queues`) | Zernio's per-weekday slots are kept exactly. |
|
|
88
|
+
| Webhooks | the brand's webhook alert channel | One webhook URL per brand. Signed the Standard Webhooks way (`webhook-id`, `webhook-timestamp`, `webhook-signature`); the secret is returned when you first register. Event names are translated both ways; an event Hermoso does not send is listed in `warnings`. |
|
|
89
|
+
| Ayrshare `generateJWT`, Zernio `getConnectUrl` | a connect link (`POST /v1/connect-links`) | Hermoso links connect one platform each, so pass `allowedSocial`. |
|
|
90
|
+
|
|
91
|
+
**Behaviour you should know about**
|
|
92
|
+
|
|
93
|
+
- **Publish now waits for the result**, like Ayrshare and Zernio do, up to 2 minutes (Ayrshare) or 5 (Zernio):
|
|
94
|
+
options `waitForPublish` / `publishTimeoutMs` (Node) and `wait_for_publish` / `publish_timeout` (Python).
|
|
95
|
+
- **Media URLs are copied to Hermoso's storage** before posting, so a link that expires does not break a scheduled
|
|
96
|
+
post. Turn it off with `rehostMedia: false`.
|
|
97
|
+
- **Errors keep each SDK's style.** The Ayrshare layer returns `{ status: 'error', code, message }` instead of
|
|
98
|
+
throwing, as Ayrshare's SDK does; the Zernio layer throws `ZernioApiError` and its subclasses. Hermoso's own `code`
|
|
99
|
+
(for example `channel_not_connected`) is passed through.
|
|
100
|
+
- **A method this layer does not serve throws `HermosoUnsupportedError`** (in every layer, Ayrshare included), and
|
|
101
|
+
its message names the Hermoso tool that does the job. Every Hermoso tool is one call away:
|
|
102
|
+
`client.callTool(name, args)` (Node) or `client.call_tool(name, args)` (Python), which is `POST /v1/tools/{name}`.
|
|
103
|
+
The list: `GET https://app.hermoso.ai/v1/tools`.
|
|
104
|
+
- **X needs no keys of your own.** Ayrshare's `setTwitterByo` is accepted and ignored; Hermoso posts through the X
|
|
105
|
+
account the brand connected.
|
|
106
|
+
- **Deleting a published post** is each platform's own delete in Hermoso. `delete` / `deletePost` cancel a post that
|
|
107
|
+
has not gone out yet; for one that has, the error names the tool per platform (`delete_x_post`, `manage_meta_post`, …).
|
|
108
|
+
|
|
109
|
+
## Method coverage
|
|
110
|
+
|
|
111
|
+
✅ served · ◐ served with a difference noted · ✖ throws `HermosoUnsupportedError` naming the tool
|
|
112
|
+
|
|
113
|
+
### Ayrshare
|
|
114
|
+
|
|
115
|
+
Node names first; the Python name follows where it differs.
|
|
116
|
+
|
|
117
|
+
| Method | | Hermoso |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `post` | ✅ | `POST /v1/posts`. `profileKeys` posts to each brand. Platform options mapped: YouTube, Instagram, Facebook, LinkedIn, Pinterest, TikTok, X, Google Business, Telegram, Threads, Bluesky. `requiresApproval` and `randomPost` ✖. |
|
|
120
|
+
| `delete` | ◐ | Cancels a scheduled post (`id`, `bulk`, `deleteAllScheduled`). A published one: the error names each platform's delete tool. |
|
|
121
|
+
| `updatePost` | ✅ | `PATCH /v1/posts/{id}` (time, text, media, platforms) |
|
|
122
|
+
| `retryPost` | ✅ | `retry_scheduled` |
|
|
123
|
+
| `getPost` | ✅ | `GET /v1/posts/{id}` |
|
|
124
|
+
| `history` | ✅ | `GET /v1/posts`; `history({ platform })` reads what is on that channel (`list_published_posts`) |
|
|
125
|
+
| `media` | ✅ | `GET /v1/library` |
|
|
126
|
+
| `verifyMediaExists` | ✅ | a HEAD request from your process |
|
|
127
|
+
| `mediaUploadUrl` | ◐ | `upload_file`. PUT the bytes to `uploadUrl`; its response body holds the final `url` (`accessUrl` is null). |
|
|
128
|
+
| `upload` | ✅ | `POST /v1/media` |
|
|
129
|
+
| `analyticsPost` | ✅ | the post's measured numbers (`list_published_posts`) |
|
|
130
|
+
| `analyticsSocial` | ✅ | `GET /v1/analytics/follower-history` |
|
|
131
|
+
| `user` | ✅ | brands, connections, credits |
|
|
132
|
+
| `createProfile` | ✅ | `create_brand` |
|
|
133
|
+
| `updateProfile` | ✅ | `update_brand` (sets the brand's name) |
|
|
134
|
+
| `getProfiles` | ✅ | `GET /v1/brands` |
|
|
135
|
+
| `deleteProfile` | ✖ | `delete_brand` (irreversible, confirm-gated: use MCP or the app) |
|
|
136
|
+
| `generateJWT` | ✅ | `POST /v1/connect-links`, one per `allowedSocial` platform |
|
|
137
|
+
| `unlinkSocial` | ✅ | `DELETE /v1/connections/{provider}` |
|
|
138
|
+
| `postComment`, `getComments`, `replyComment`, `deleteComments` | ✅ | Facebook, Instagram, YouTube (no top-level comment), TikTok, LinkedIn Pages, Threads |
|
|
139
|
+
| `setAutoSchedule`, `deleteAutoSchedule`, `listAutoSchedule` | ✅ | `manage_post_queues` |
|
|
140
|
+
| `registerWebhook`, `unregisterWebhook`, `listWebhooks` | ✅ | actions `social`, `scheduled`, `messages`, `comments`, `reviews`, `mentions` |
|
|
141
|
+
| `generatePost`, `generateRewrite`, `generateTranslation` (+ Python `generateSentiment`) | ✅ | `generate_text` (billed in Hermoso credits) |
|
|
142
|
+
| `generateTranscription` | ✅ | `analyze_video` (billed in Hermoso credits) |
|
|
143
|
+
| `reviews`, `review`, `replyReview` / `reviewReply`, `deleteReplyReview` / `deleteReviewReply` | ✅ | Google Business Profile and Facebook Page reviews |
|
|
144
|
+
| `setProfileKey`, `setTwitterByo` / `set_twitter_byo`, `clearTwitterByo` / `clear_twitter_byo` | ✅ | |
|
|
145
|
+
| `feedAdd` / `addFeed`, `feedGet` / `getFeeds`, `feedUpdate` / `updateFeed`, `feedDelete` / `deleteFeed` | ✖ | `set_post_refill` (autopilot posting) |
|
|
146
|
+
| `shorten`, `shortLink`, `shortLinkAnalytics`, `analyticsLinks` | ✖ | `set_tracking_links` |
|
|
147
|
+
| `generateAltText`, `autoHashtags` | ✖ | `generate_text` |
|
|
148
|
+
| `recommendHashtags` | ✖ | `tiktok_hashtag_suggestions` |
|
|
149
|
+
| `checkBannedHashtags` | ✖ | `check_ad_policy` |
|
|
150
|
+
| `mediaMeta` | ✖ | `analyze_video` |
|
|
151
|
+
| `resizeImage` | ✖ | `resize_ad` |
|
|
152
|
+
| `getBrandByUser` | ✖ | `fetch_social_data` |
|
|
153
|
+
|
|
154
|
+
### Zernio
|
|
155
|
+
|
|
156
|
+
Node `namespace.method`; Python uses the same namespace with snake_case names (`posts.create_post`), plus the short
|
|
157
|
+
names (`posts.create`, `posts.list`, `posts.get`, `posts.update`, `posts.delete`, `posts.retry`, `accounts.list`,
|
|
158
|
+
`profiles.list`, `queue.get_slots`, `queue.update_slots`, `queue.delete_slots`, `analytics.get`, `media.upload`,
|
|
159
|
+
`media.upload_bytes`) and every `a…` async twin.
|
|
160
|
+
|
|
161
|
+
| Method | | Hermoso |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| `posts.createPost` | ◐ | `POST /v1/posts`. `publishNow`, `scheduledFor`, `queuedFromProfile`/`queueId`, `dryRun` (validated against each channel's limits, nothing created), `customContent`, `mediaItems`, `platformSpecificData`, `tiktokSettings`, `Idempotency-Key`. Drafts (`isDraft`, or none of the three timings) ✖ `schedule_post`. `customMedia` and per-platform `scheduledFor` are reported in `warnings`. |
|
|
164
|
+
| `posts.listPosts`, `getPost`, `updatePost`, `deletePost`, `retryPost` | ✅ | `/v1/posts`, `retry_scheduled` |
|
|
165
|
+
| `posts.editPost`, `pinPost`, `unpinPost`, `unpublishPost` | ✖ | `manage_meta_post` (and each platform's own tool) |
|
|
166
|
+
| `posts.bulkUploadPosts` | ✖ | `import_posts_csv` |
|
|
167
|
+
| `profiles.listProfiles`, `createProfile`, `getProfile`, `updateProfile` | ✅ | `/v1/brands`, `create_brand`, `update_brand` |
|
|
168
|
+
| `profiles.deleteProfile` | ✖ | `delete_brand` |
|
|
169
|
+
| `accounts.listAccounts`, `getAccount`, `deleteAccount`, `getAllAccountsHealth`, `getAccountHealth`, `getFollowerStats`, `getAccountPosts` | ✅ | `/v1/channels`, `/v1/connections`, follower history, `list_published_posts` |
|
|
170
|
+
| `accounts.getGoogleBusinessReviews`, `replyToGoogleBusinessReview`, `deleteGoogleBusinessReviewReply` | ✅ | Google Business Profile tools |
|
|
171
|
+
| `media.getMediaPresignedUrl` | ◐ | `upload_file`. `publicUrl` is null: the PUT's response body holds the URL. Python `media.upload(path)` / `upload_bytes(...)` return `publicUrl` directly. |
|
|
172
|
+
| `queue.listQueueSlots`, `createQueueSlot`, `updateQueueSlot`, `deleteQueueSlot` | ✅ | `manage_post_queues` |
|
|
173
|
+
| `webhooks.getWebhookSettings`, `createWebhookSettings`, `updateWebhookSettings`, `deleteWebhookSettings`, `testWebhook`, `getWebhookLogs`, `redeliverWebhookEvent` | ✅ | the webhook alert channel |
|
|
174
|
+
| `connect.getConnectUrl`, `createPlatformInvite` | ✅ | `POST /v1/connect-links` |
|
|
175
|
+
| `analytics.getAnalytics`, `getBestTimeToPost`, `getContentDecay`, `getPostingFrequency`, `getInstagramFollowerHistory` | ✅ | `list_published_posts`, `/v1/analytics/*` |
|
|
176
|
+
| `users.getCurrentUser`, `usage.getUsageStats`, `usage.getUsage` | ✅ | `/v1/brands`, `/v1/account/email`, `/v1/credits` |
|
|
177
|
+
| `comments.getInboxPostComments`, `replyToInboxPost`, `deleteInboxComment`, `hideInboxComment`, `unhideInboxComment`, `sendPrivateReplyToComment` | ✅ | per-platform comment tools |
|
|
178
|
+
| `reviews.listInboxReviews`, `replyToInboxReview`, `deleteInboxReviewReply` | ✅ | Google Business Profile and Facebook Page reviews |
|
|
179
|
+
| `validate.validatePostLength`, `validatePost` | ✅ | each channel's limits from `/v1/channels` |
|
|
180
|
+
| Every other method, in any namespace (ads, WhatsApp, SMS, email, CRM, …) | ✖ | The error names the closest tool where there is one (`create_meta_campaign`, `send_whatsapp_message`, `send_sms`, `list_inbox`, …), else a `/v1/tools?search=` link. |
|
|
181
|
+
|
|
182
|
+
### Postiz
|
|
183
|
+
|
|
184
|
+
| Method | | Hermoso |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| `post` | ◐ | `POST /v1/posts`, one Hermoso post per entry in `posts[]`. Extra `value[]` items become an X thread, or the first comment elsewhere. `type: 'draft'` ✖ `schedule_post`. |
|
|
187
|
+
| `postList` | ✅ | `GET /v1/posts` (`startDate`/`endDate`, or `display` week/month) |
|
|
188
|
+
| `upload` | ✅ | `POST /v1/media` |
|
|
189
|
+
| `integrations` | ✅ | `/v1/channels` + `/v1/connections` |
|
|
190
|
+
| `deletePost` | ✅ | `DELETE /v1/posts/{id}` (resolves with a Response-like object, as the original does) |
|
|
191
|
+
|
|
192
|
+
## Zernio REST → Hermoso REST
|
|
193
|
+
|
|
194
|
+
If you call Zernio's HTTP API directly, this is where each call goes. Hermoso's base URL is
|
|
195
|
+
`https://app.hermoso.ai`, auth is `Authorization: Bearer hmk_…`, and the brand is the `X-Hermoso-User` header.
|
|
196
|
+
Responses are Hermoso's own shapes (documented at [hermoso.ai/docs/api](https://hermoso.ai/docs/api/)); to keep
|
|
197
|
+
Zernio's shapes, run the call through this package: `zernio.request('POST', '/v1/posts', { body })`.
|
|
198
|
+
|
|
199
|
+
| Zernio | Hermoso |
|
|
200
|
+
|---|---|
|
|
201
|
+
| `POST /v1/posts` | `POST /v1/posts` (`content`→`caption`, `platforms[].platform`→`channels[]`, `scheduledFor`→`scheduled_at`, `customContent`→`captions_by_channel`, `mediaItems`→`media`; omit `scheduled_at` to publish now) |
|
|
202
|
+
| `GET /v1/posts`, `GET/PUT/DELETE /v1/posts/{id}` | `GET /v1/posts`, `GET/PATCH/DELETE /v1/posts/{id}` |
|
|
203
|
+
| `POST /v1/posts/{id}/retry` | `POST /v1/tools/retry_scheduled` `{"id"}` |
|
|
204
|
+
| `GET /v1/accounts` | `GET /v1/channels` (`connected: true`) and `GET /v1/connections` |
|
|
205
|
+
| `DELETE /v1/accounts/{id}` | `DELETE /v1/connections/{provider}?account=` |
|
|
206
|
+
| `GET /v1/profiles`, `POST /v1/profiles` | `GET /v1/brands`, `POST /v1/tools/create_brand` |
|
|
207
|
+
| `POST /v1/media/presign` | `POST /v1/media` (bytes or `?url=`), or `POST /v1/tools/upload_file` `{"getUploadUrl": true}` |
|
|
208
|
+
| `GET/POST/PUT/DELETE /v1/queue/slots` | `POST /v1/tools/manage_post_queues` (`action` list / save / delete) |
|
|
209
|
+
| `GET/POST/PUT/DELETE /v1/webhooks/settings` | `POST /v1/tools/connect_connector` `{"provider":"webhook","fields":{"webhookUrl"}}`, `set_alert_events`, `list_alert_settings`, `disconnect_connector` |
|
|
210
|
+
| `POST /v1/webhooks/test`, `GET /v1/webhooks/logs`, `POST /v1/webhooks/logs/redeliver` | `send_test_alert`, `list_alert_settings` (`deliveries`), `redeliver_webhook` |
|
|
211
|
+
| `GET /v1/connect/{platform}` | `POST /v1/connect-links` `{"provider"}` |
|
|
212
|
+
| `GET /v1/analytics` | `POST /v1/tools/list_published_posts` |
|
|
213
|
+
| `GET /v1/analytics/best-time`, `/content-decay`, `/posting-frequency` | same paths under `/v1/analytics/` |
|
|
214
|
+
| `GET /v1/accounts/follower-stats` | `GET /v1/analytics/follower-history` |
|
|
215
|
+
| `GET /v1/users/me`, `GET /v1/usage-stats` | `GET /v1/brands`, `GET /v1/account/email`, `GET /v1/credits` |
|
|
216
|
+
| `/v1/inbox/comments/…`, `/v1/inbox/reviews/…` | the per-platform comment and review tools (`list_meta_comments`, `reply_to_meta_comment`, `list_google_business_reviews`, …) |
|
|
217
|
+
| anything else | `GET /v1/tools?search=<what you need>` |
|
|
218
|
+
|
|
219
|
+
## Beyond what you had
|
|
220
|
+
|
|
221
|
+
The same key reaches everything else Hermoso does: generate image and video ads, research competitors' ads, run paid
|
|
222
|
+
campaigns, read analytics, and call every tool in Hermoso's catalog. Use the official SDKs for that:
|
|
223
|
+
[`@hermoso/sdk`](https://www.npmjs.com/package/@hermoso/sdk), [`hermoso`](https://pypi.org/project/hermoso/), and
|
|
224
|
+
[more languages](https://hermoso.ai/docs/sdks/).
|
|
225
|
+
|
|
226
|
+
## How this was tested
|
|
227
|
+
|
|
228
|
+
`npm test` (Node) and `python -m unittest discover -s python/tests` run each layer against a stand-in for the API.
|
|
229
|
+
Before each release the layers are also run end to end against a real Hermoso server with a brand whose only
|
|
230
|
+
channel cannot publish, so publish calls fail cleanly and nothing is posted anywhere public.
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
MIT. Issues and pull requests are welcome.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Drop-in compatibility layers that run other social-posting SDKs' code on Hermoso (https://hermoso.ai).
|
|
2
|
+
|
|
3
|
+
from hermoso_compat.ayrshare import SocialPost # Ayrshare's social-post-api
|
|
4
|
+
from hermoso_compat.zernio import Zernio # Zernio's zernio-sdk
|
|
5
|
+
|
|
6
|
+
Unofficial: written by Hermoso. Not affiliated with, endorsed by or sponsored by Ayrshare or Zernio; their names are
|
|
7
|
+
used only to say which SDK each layer is compatible with.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from ._core import VERSION, HermosoApiError, HermosoClient, HermosoUnsupportedError
|
|
11
|
+
|
|
12
|
+
__version__ = VERSION
|
|
13
|
+
__all__ = ["HermosoClient", "HermosoApiError", "HermosoUnsupportedError", "__version__"]
|