Visitar URL original
Merge pull request #11 from serpapi/readme-doc-update · serpapi/serpapi-java@2605499 · GitHub
Skip to content

Commit 2605499

Browse files
Merge pull request #11 from serpapi/readme-doc-update
Java README Integration Guide Additions and Revisions
2 parents 6167b1c + 8108478 commit 2605499

13 files changed

Lines changed: 1054 additions & 615 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ derive.rb
1111
gradlew.bat
1212
switch_java.sh
1313
.DS_Store
14+
.vscode/

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Changelog
2+
**1.2.0** (latest) — Add markdown support, improve error handling if corrupt data received
3+
4+
**1.1.0** — Java 21, Gradle 8.x; ongoing API and example updates
5+
6+
**1.0.0** — Revisit API naming and align the client with serpapi.com

‎CONTRIBUTING.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Contributing
2+
3+
## Key Goals
4+
5+
- Brand centric instead of search engine based
6+
- No hard-coded logic per search engine
7+
- Simple HTTP client (lightweight, reduced dependency)
8+
- No magic default values
9+
- Thread safe
10+
- Easy extension
11+
- Defensive code style (raise a custom exception)
12+
- TDD - Test driven development
13+
- Best API coding practice per platform
14+
- KISS principles
15+
16+
## Code Quality Expectations
17+
18+
19+
We use JUnit, GitHub Actions (see workflow), and Gradle.
20+
21+
Run the full test suite locally (integration tests call the live API when a key is present):
22+
23+
```bash
24+
export SERPAPI_KEY='your_key' # optional: without it, many tests skip; some tests require the key and will fail if unset
25+
./gradlew test
26+
```
27+
28+
Regenerate README.md from the template after editing examples:
29+
30+
```bash
31+
make readme # requires Ruby `erb`
32+
```
33+
34+
How to build from source
35+
Clone the repository:
36+
37+
```bash
38+
git clone https://github.com/serpapi/serpapi-java.git
39+
cd serpapi-java
40+
```
41+
42+
Build (use the wrapper):
43+
44+
```bash
45+
./gradlew build
46+
```
47+
48+
The main library JAR is under build/libs/ (for example serpapi-1.1.0.jar, name follows version in build.gradle). Copy it into your project’s lib/ directory if you are not using Maven/Gradle dependency resolution.

0 commit comments

Comments
 (0)