Skip to content

Commit e91ce74

Browse files
committed
chore: prepare project to publishing
1 parent 080a619 commit e91ce74

File tree

4 files changed

+104
-1
lines changed

4 files changed

+104
-1
lines changed

.github/workflows/build-test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [20.x]
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- name: Install dependencies
29+
run: yarn install
30+
31+
- name: Run tests
32+
env:
33+
TOKEN: ${{ secrets.TOKEN }} # GitHub Secrets'ten tokeni okur
34+
run: yarn test # Test komutunu çalıştırır

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# node-do
2+
3+
#### Scrape.do's official http client for node.js
4+
5+
## How to install?
6+
7+
```shell
8+
npm install @scrape-do/do
9+
# or get it from github
10+
npm install git://git@github.com/scrape-do/node-do
11+
```
12+
13+
## How to build from scratch
14+
15+
#### If you want to contribute to the library or include your own customisations, you can recompile the library in this way.
16+
17+
```shell
18+
git clone https://github.com/scrape-do/node-do
19+
npm i
20+
# build with
21+
npm build
22+
```
23+
24+
## Example Usage
25+
26+
#### The following example returns the response of how you requested from httpbin.co. You should see the ‘A123’ header in the header section of the response.
27+
28+
```typescript
29+
const client = new ScrapeDo("example_token");
30+
const response = await client.doRequest("GET", {
31+
url: "https://httpbin.co/anything",
32+
extraHeaders: {
33+
"sd-A123": "Extra Header",
34+
},
35+
});
36+
37+
console.log(response.data);
38+
```
39+
40+
## More details
41+
42+
#### [Documentation for more information](https://scrape.do/documentation/?utm_source=github&utm_medium=node-do)
43+
44+
#### [Scrape.do](https://scrape.do?utm_source=github&utm_medium=node-do)
45+
46+
## License
47+
48+
### This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
49+
50+
## Disclaimer
51+
52+
### Any damages arising from the use of the library or service or any other legal situation cannot be associated with the scrape.do legal entity and team. The responsibility lies entirely with the user.

package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,24 @@
33
"version": "1.0.0",
44
"main": "dist/lib.js",
55
"types": "src/lib.d.ts",
6-
"repository": "https://github.com/scrapedo/do",
6+
"description": "Scrape.do Node.js API client",
7+
"keywords": [
8+
"scrape",
9+
"do",
10+
"scraping",
11+
"api",
12+
"client",
13+
"node",
14+
"typescript",
15+
"scrape.do",
16+
"scrape-do",
17+
"http",
18+
"scrape.do api"
19+
],
20+
"repository": {
21+
"type": "git",
22+
"url": "git+ssh://git@github.com/scrape-do/node-do.git"
23+
},
724
"scripts": {
825
"dev": "npx ts-node src/lib.ts",
926
"build": "tsc",
File renamed without changes.

0 commit comments

Comments
 (0)