Skip to content

Commit 4172cff

Browse files
committed
removed GeocachingSdkInterface and grouped all methods in GeocachingSdk
1 parent c3bfe96 commit 4172cff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1294
-3128
lines changed

README.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
[![Total Downloads](https://poser.pugx.org/surfoo/geocaching-php-sdk/downloads.svg)](https://packagist.org/packages/surfoo/geocaching-php-sdk)
55
[![Latest Unstable Version](https://poser.pugx.org/surfoo/geocaching-php-sdk/v/unstable.svg)](https://packagist.org/packages/surfoo/geocaching-php-sdk)
66

7-
The documentation about the API is available here:
8-
- https://api.groundspeak.com/documentation
9-
- https://api.groundspeak.com/api-docs/index
7+
The documentation about the API is available here:
8+
9+
- https://api.groundspeak.com/documentation
10+
- https://api.groundspeak.com/api-docs/index
1011

1112
You can follow changes about the documentation and the API here:
12-
- https://github.com/Surfoo/groundspeak-api-monitoring
13+
14+
- https://github.com/Surfoo/groundspeak-api-monitoring
1315

1416
## Requirements
1517

16-
- PHP >= 8.1
17-
- [composer](https://getcomposer.org/doc/00-intro.md#system-requirements).
18+
- PHP >= 8.1
19+
- [composer](https://getcomposer.org/doc/00-intro.md#system-requirements).
1820

1921
## Composer
2022

@@ -33,9 +35,10 @@ You can find an example of implementation (with OAuth 2) in this repository: htt
3335
## Usage Guide
3436

3537
See [`USAGE.md`](./USAGE.md) for detailed usage instructions, including:
36-
- How to use the new modular client structure (recommended)
37-
- How to use legacy method calls (backward compatibility)
38-
- Examples for common API calls
38+
39+
- Basic usage examples
40+
- Complete API method reference
41+
- HTTP logging configuration
3942

4043
## HTTP Request/Response Logging
4144

@@ -74,31 +77,31 @@ $options->enableHttpLogging(
7477
$sdk = new GeocachingSdk($options);
7578

7679
// All API calls will now be logged
77-
$response = $sdk->status()->ping();
80+
$response = $sdk->ping();
7881
```
7982

8083
### Configuration Options
8184

8285
#### Simple Logging (enableHttpLogging)
8386

84-
| Parameter | Type | Default | Description |
85-
|-----------|------|---------|-------------|
86-
| `$output` | `string` | `'php://stdout'` | Output destination (console, file path, etc.) |
87-
| `$level` | `string` | `LogLevel::INFO` | Base log level for successful requests |
88-
| `$logBodies` | `bool` | `false` | Whether to include request/response bodies |
89-
| `$maskTokens` | `bool` | `true` | Automatically mask sensitive authentication data |
90-
| `$maxBodyLength` | `int` | `1000` | Maximum body length before truncation |
91-
| `$logFormat` | `string\|null` | `null` | Custom log format (null for default) |
87+
| Parameter | Type | Default | Description |
88+
| ---------------- | -------------- | ---------------- | ------------------------------------------------ |
89+
| `$output` | `string` | `'php://stdout'` | Output destination (console, file path, etc.) |
90+
| `$level` | `string` | `LogLevel::INFO` | Base log level for successful requests |
91+
| `$logBodies` | `bool` | `false` | Whether to include request/response bodies |
92+
| `$maskTokens` | `bool` | `true` | Automatically mask sensitive authentication data |
93+
| `$maxBodyLength` | `int` | `1000` | Maximum body length before truncation |
94+
| `$logFormat` | `string\|null` | `null` | Custom log format (null for default) |
9295

9396
#### Advanced Logging (enableHttpLoggingWithLogger)
9497

95-
| Parameter | Type | Default | Description |
96-
|-----------|------|---------|-------------|
97-
| `$logger` | `LoggerInterface` | *required* | Custom PSR-3 compatible logger |
98-
| `$level` | `string` | `LogLevel::INFO` | Base log level for successful requests |
99-
| `$logBodies` | `bool` | `false` | Whether to include request/response bodies |
100-
| `$maskTokens` | `bool` | `true` | Automatically mask sensitive authentication data |
101-
| `$maxBodyLength` | `int` | `1000` | Maximum body length before truncation |
98+
| Parameter | Type | Default | Description |
99+
| ---------------- | ----------------- | ---------------- | ------------------------------------------------ |
100+
| `$logger` | `LoggerInterface` | _required_ | Custom PSR-3 compatible logger |
101+
| `$level` | `string` | `LogLevel::INFO` | Base log level for successful requests |
102+
| `$logBodies` | `bool` | `false` | Whether to include request/response bodies |
103+
| `$maskTokens` | `bool` | `true` | Automatically mask sensitive authentication data |
104+
| `$maxBodyLength` | `int` | `1000` | Maximum body length before truncation |
102105

103106
### Log Output Example
104107

@@ -135,7 +138,7 @@ $options->enableHttpLoggingWithLogger(
135138
$customLogger,
136139
LogLevel::DEBUG,
137140
true, // Log bodies
138-
true, // Mask tokens
141+
true, // Mask tokens
139142
2000 // Max body length
140143
);
141144
```

0 commit comments

Comments
 (0)