-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(config,-tests): added main config file, refactored variables…
…, added unit tests for base functions
- Loading branch information
Showing
18 changed files
with
9,564 additions
and
3,436 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
on: | ||
workflow_dispatch: {} | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- .github/workflows/semgrep.yml | ||
schedule: | ||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00 | ||
- cron: 43 9 * * * | ||
name: Semgrep | ||
jobs: | ||
semgrep: | ||
name: semgrep/ci | ||
runs-on: ubuntu-20.04 | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: semgrep ci | ||
on: | ||
workflow_dispatch: {} | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- .github/workflows/semgrep.yml | ||
schedule: | ||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00 | ||
- cron: 43 9 * * * | ||
name: Semgrep | ||
jobs: | ||
semgrep: | ||
name: semgrep/ci | ||
runs-on: ubuntu-20.04 | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: semgrep ci |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"endOfLine": "crlf" | ||
} | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"endOfLine": "crlf" | ||
} |
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 |
---|---|---|
@@ -1,54 +1,60 @@ | ||
![](https://tc-images-api.s3.eu-central-1.amazonaws.com/gif_cropped.gif) | ||
|
||
# TON Solutions Telemetree library for React.js | ||
![Static Badge](https://img.shields.io/badge/build-passing-brightgreen?style=flat) ![GitHub top language](https://img.shields.io/github/languages/top/tonsolutions/telemetree-react) ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/tonsolutions/telemetree-react) | ||
|
||
To learn more about the SDK, here are some useful links: | ||
- Documentation: https://docs.telemetree.io/ | ||
- Boilerplate: https://github.com/TONSolutions/react-twa-boilerplate | ||
|
||
## Installation | ||
|
||
Install it from [NPM](https://www.npmjs.com/package/@tonsolutions/telemetree-react): | ||
``` | ||
$ npm install @tonsolutions/telemetree-react | ||
``` | ||
|
||
## How to use | ||
Call this script in `<head>`: | ||
|
||
```html | ||
<script src="https://telegram.org/js/telegram-web-app.js"></script> | ||
``` | ||
In your app: | ||
|
||
```javascript | ||
import { TwaAnalyticsProvider } from '@tonsolutions/telemetree-react'; | ||
|
||
export function App() { | ||
return ( | ||
<TwaAnalyticsProvider | ||
projectId='YOUR_PROJECT_ID' | ||
apiKey='YOUR_API_KEY' | ||
appName='YOUR_APPLICATION_NAME' | ||
> | ||
... | ||
</TwaAnalyticsProvider> | ||
); | ||
} | ||
``` | ||
|
||
```js | ||
import { useTWAEvent } from '@tonsolutions/telemetree-react'; | ||
|
||
const builder = useTWAEvent(); | ||
builder.track('transfer', { | ||
amount: 1000, | ||
method: 'TON', | ||
}); | ||
``` | ||
|
||
## User data and Processing | ||
This library is designed to automatically retrieve user data from Telegram, enhancing your events with valuable insights. | ||
|
||
Adhering to Telegram's high standards of security, we employ RSA encryption for the transmission of data across networks, ensuring both the integrity and safety of your analytics processes | ||
![](https://tc-images-api.s3.eu-central-1.amazonaws.com/gif_cropped.gif) | ||
|
||
# TON Solutions Telemetree library for React.js | ||
|
||
![Static Badge](https://img.shields.io/badge/build-passing-brightgreen?style=flat) ![GitHub top language](https://img.shields.io/github/languages/top/tonsolutions/telemetree-react) ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/tonsolutions/telemetree-react) | ||
|
||
To learn more about the SDK, here are some useful links: | ||
|
||
- Documentation: https://docs.telemetree.io/ | ||
- Boilerplate: https://github.com/TONSolutions/react-twa-boilerplate | ||
|
||
## Installation | ||
|
||
Install it from [NPM](https://www.npmjs.com/package/@tonsolutions/telemetree-react): | ||
|
||
``` | ||
$ npm install @tonsolutions/telemetree-react | ||
``` | ||
|
||
## How to use | ||
|
||
Call this script in `<head>`: | ||
|
||
```html | ||
<script src="https://telegram.org/js/telegram-web-app.js"></script> | ||
``` | ||
|
||
In your app: | ||
|
||
```javascript | ||
import { TwaAnalyticsProvider } from '@tonsolutions/telemetree-react'; | ||
|
||
export function App() { | ||
return ( | ||
<TwaAnalyticsProvider | ||
projectId="YOUR_PROJECT_ID" | ||
apiKey="YOUR_API_KEY" | ||
appName="YOUR_APPLICATION_NAME" | ||
> | ||
... | ||
</TwaAnalyticsProvider> | ||
); | ||
} | ||
``` | ||
|
||
```js | ||
import { useTWAEvent } from '@tonsolutions/telemetree-react'; | ||
|
||
const builder = useTWAEvent(); | ||
builder.track('transfer', { | ||
amount: 1000, | ||
method: 'TON', | ||
}); | ||
``` | ||
|
||
## User data and Processing | ||
|
||
This library is designed to automatically retrieve user data from Telegram, enhancing your events with valuable insights. | ||
|
||
Adhering to Telegram's high standards of security, we employ RSA encryption for the transmission of data across networks, ensuring both the integrity and safety of your analytics processes |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Telegram } from "./src/telegram"; | ||
|
||
declare global { | ||
interface Window { | ||
Telegram?: { | ||
WebApp: Telegram.WebApp; | ||
WebView: Telegram.WebView; | ||
}; | ||
} | ||
} | ||
import { Telegram } from './src/telegram'; | ||
|
||
declare global { | ||
interface Window { | ||
Telegram?: { | ||
WebApp: Telegram.WebApp; | ||
WebView: Telegram.WebView; | ||
}; | ||
} | ||
} |
Oops, something went wrong.