-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: docs and examples for publication submodule
- Loading branch information
Showing
12 changed files
with
317 additions
and
162 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { getAuthenticatedClientFromEthersWallet } from "../shared/getAuthenticatedClient"; | ||
import { setupWallet } from "../shared/setupWallet"; | ||
|
||
async function main() { | ||
const wallet = setupWallet(); | ||
const client = await getAuthenticatedClientFromEthersWallet(wallet); | ||
|
||
// get user's publications | ||
// hide one of them | ||
|
||
const result = await client.publication.hide({ | ||
for: "0x014e-0x0a", | ||
}); | ||
|
||
console.log(`Publication was hidden: `, result); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
PublicationReportingReason, | ||
PublicationReportingSpamSubreason, | ||
} from "@lens-protocol/client"; | ||
import { getAuthenticatedClientFromEthersWallet } from "../shared/getAuthenticatedClient"; | ||
import { setupWallet } from "../shared/setupWallet"; | ||
|
||
async function main() { | ||
const wallet = setupWallet(); | ||
const client = await getAuthenticatedClientFromEthersWallet(wallet); | ||
|
||
const result = await client.publication.report({ | ||
for: "0x014e-0x0a", | ||
reason: { | ||
spamReason: { | ||
reason: PublicationReportingReason.Spam, | ||
subreason: PublicationReportingSpamSubreason.FakeEngagement, | ||
}, | ||
}, | ||
additionalComments: "comment", | ||
}); | ||
|
||
console.log(`Publication was hidden: `, result); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.