c860cf6d88bbfe65b9cddceb8a7898efba531044
Socialhose SDKs
Official SDKs for the Socialhose Public API.
SDKs
sdks/javascript— npm package@socialhose/api
Future SDKs can live beside it, e.g. sdks/python, sdks/go, or sdks/php.
JavaScript / TypeScript
npm install @socialhose/api
import { SocialhoseClient } from '@socialhose/api';
const socialhose = new SocialhoseClient({
apiKey: process.env.SOCIALHOSE_API_KEY!,
});
const mentions = await socialhose.getMentions({
content_search: 'hospital',
ordering: '-published_at',
});
console.log(mentions.count);
Documentation lives with the package:
Development
Use pnpm 9.x.
pnpm install
pnpm test
pnpm typecheck
pnpm build
On machines where Corepack's pnpm shim is broken, use:
npx --yes pnpm@9.15.0 install
npx --yes pnpm@9.15.0 test
Publishing JavaScript SDK
cd sdks/javascript
pnpm test
pnpm typecheck
pnpm build
npm publish --access public --provenance
Do not publish 1.0.0 until the API endpoint inventory is complete and at least two real consumers have migrated.
Description
Official SDKs for the Socialhose Public API.
https://socialhose.net/api/public/v1/docs/
Languages
TypeScript
100%