Skip to content

Commit 27d4687

Browse files
authored
Merge pull request #25 from mike-gee/fix/0.3.1/fix-reference-issue
Fix/0.3.1/fix reference issue
2 parents 793b57f + 463d5d8 commit 27d4687

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ scraper = webt.Scraper(
7777
out_json = scraper.scrape("https://www.example.com")
7878
```
7979

80-
## Web Search (SERP API)
80+
## Web Search (AI SERP API)
8181

8282
```python
8383
import webtranspose as webt

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
[tool.poetry]
33
name = "webtranspose"
4-
version = "0.3.0"
5-
description = "APIs for the internet"
4+
version = "0.3.1"
5+
description = "Reliable APIs for the website data"
66
authors = ["Mike Gee <[email protected]>"]
77

88
readme = "README.md"

src/webtranspose/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = """Mike Gee"""
44
__email__ = "[email protected]"
5-
__version__ = "0.3.0"
5+
__version__ = "0.3.1"
66

77
from .chat import *
88
from .crawl import *

src/webtranspose/search.py

+21-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@
33

44
from .webt_api import run_webt_api
55

6+
def search(query, api_key=None) -> dict:
7+
"""
8+
Search for a query using the Web Transpose API.
69
7-
def search(query):
10+
Args:
11+
query (str): The query to search for.
12+
api_key (str, optional): The API key to use for authentication. Defaults to None.
13+
14+
Returns:
15+
dict: The search results.
16+
"""
817
if api_key is None:
918
api_key = os.environ.get("WEBTRANSPOSE_API_KEY")
1019

@@ -21,7 +30,17 @@ def search(query):
2130
raise ValueError("Must provide api_key or set WEBTRANSPOSE_API_KEY in environment variables.")
2231

2332

24-
def search_filter(query):
33+
def search_filter(query, api_key=None) -> dict:
34+
"""
35+
Search for a query using the Web Transpose API with filtering.
36+
37+
Args:
38+
query (str): The query to search for.
39+
api_key (str, optional): The API key to use for authentication. Defaults to None.
40+
41+
Returns:
42+
dict: The filtered search results.
43+
"""
2544
if api_key is None:
2645
api_key = os.environ.get("WEBTRANSPOSE_API_KEY")
2746

0 commit comments

Comments
 (0)