@adsgram/react 1.0.2 → 1.0.3
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.
- package/README.md +8 -3
- package/package.json +14 -1
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
React bindings for Adsgram SDK. Provides components and hooks for ad tasks and fullscreen banners.
|
|
4
4
|
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
- Integration guide: https://docs.adsgram.ai/publisher/
|
|
8
|
+
- For AI coding assistants: [llms.txt](https://docs.adsgram.ai/llms.txt) (page index) and [llms-full.txt](https://docs.adsgram.ai/llms-full.txt) (full text of the documentation)
|
|
9
|
+
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
12
|
```bash
|
|
@@ -17,7 +22,7 @@ pnpm add @adsgram/react
|
|
|
17
22
|
### `<AdsgramTask />`
|
|
18
23
|
React wrapper component for the `<adsgram-task>` custom element. Using for the [Task](https://docs.adsgram.ai/publisher/task-examples) ad format.
|
|
19
24
|
|
|
20
|
-
<img src="https://docs.adsgram.ai/
|
|
25
|
+
<img src="https://docs.adsgram.ai/images/sdk/native_task.webp" alt="Task ad" width="300">
|
|
21
26
|
|
|
22
27
|
#### Props
|
|
23
28
|
| Prop | Type | Description |
|
|
@@ -64,7 +69,7 @@ export function Task(): JSX.Element | null {
|
|
|
64
69
|
### `useAdsgram`
|
|
65
70
|
React hook for managing fullscreen ads. Using for the [Reward](https://docs.adsgram.ai/publisher/reward-examples) and [Interstitial](https://docs.adsgram.ai/publisher/interstitial-examples) ad formats.
|
|
66
71
|
|
|
67
|
-
<img src="https://docs.adsgram.ai/
|
|
72
|
+
<img src="https://docs.adsgram.ai/images/sdk/rewarded_video.webp" alt="Fullscreen ad" width="300">
|
|
68
73
|
|
|
69
74
|
#### Props
|
|
70
75
|
| Prop | Type | Description |
|
|
@@ -96,7 +101,7 @@ export function AdButton(): JSX.Element {
|
|
|
96
101
|
const handleError = (): void => {
|
|
97
102
|
// user get error during playing ad
|
|
98
103
|
// do nothing or whatever you want
|
|
99
|
-
}
|
|
104
|
+
};
|
|
100
105
|
|
|
101
106
|
const { show } = useAdsgram({ blockId: '123', onReward: handleReward, onError: handleError });
|
|
102
107
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adsgram/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "React bindings for Adsgram SDK. Provides components and hooks for ad tasks and fullscreen banners.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"adsgram",
|
|
7
|
+
"telegram",
|
|
8
|
+
"telegram-mini-app",
|
|
9
|
+
"tma",
|
|
10
|
+
"ad-network",
|
|
11
|
+
"ads",
|
|
12
|
+
"rewarded-ads",
|
|
13
|
+
"monetization",
|
|
14
|
+
"react",
|
|
15
|
+
"react-hooks"
|
|
16
|
+
],
|
|
4
17
|
"homepage": "https://docs.adsgram.ai/publisher/",
|
|
5
18
|
"type": "module",
|
|
6
19
|
"main": "dist/index.js",
|