https://github.com/pkg6/website-collection
Site data collection
https://github.com/pkg6/website-collection
Last synced: 2 months ago
JSON representation
Site data collection
- Host: GitHub
- URL: https://github.com/pkg6/website-collection
- Owner: pkg6
- License: apache-2.0
- Created: 2024-09-24T02:22:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-05T05:01:06.000Z (over 1 year ago)
- Last Synced: 2025-10-30T04:47:19.584Z (5 months ago)
- Language: TypeScript
- Homepage: https://pkg6.github.io/website-collection/lib/
- Size: 55.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Install dependencies
```
npm i website-collection
```
### Loading js method
~~~
~~~
### typescript import
```
import {EventCollection} from 'website-collection/lib/collection';
```
### Create an instance
~~~
let eventCollection = new EventCollection({url: "https://data.zhiqiang.wang/data-collect/receive",headers:{"token":"123456"}});
~~~
### send data
```
eventCollection.send()
```
### setInterval send data
~~~
setInterval(() => {
eventCollection.send("timer");
}, 1000);
~~~