We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b16bf7 commit bac500eCopy full SHA for bac500e
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "api-utils",
3
- "version": "0.0.3",
+ "version": "0.0.4",
4
"description": "Utilities for interacting with the Spinamp API",
5
"main": "dist/index.js",
6
"types": "dist/index.d.ts",
src/index.ts
@@ -18,3 +18,6 @@ export {
18
MintPreconditionError,
19
NotFollowingError,
20
} from "./types/mint";
21
+export {
22
+ getFeedItemId,
23
+} from "./types/feedItem";
src/types/feedItem.ts
@@ -0,0 +1,7 @@
+export const getFeedItemId = (data: any): string => {
+ if (!data.userId || !data.entityType || !data.entityId) {
+ throw new Error('Missing feedItem data')
+ }
+
+ return `${data.userId}/${data.entityType}/${data.entityId}`
7
+}
0 commit comments