Skip to content

Commit 5d15d2e

Browse files
release: 0.8.0 (#22)
* feat(api): api update * feat(api): api update * release: 0.8.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 53e3bca commit 5d15d2e

40 files changed

Lines changed: 1389 additions & 254 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.7.0"
2+
".": "0.8.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 122
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-26de9a1d18b92c9472fcc289877ba281ae305db846b7b14065142e26c7637d72.yml
3-
openapi_spec_hash: f90f7016413291fdcbedb986385dc3ae
4-
config_hash: 17c84052d27489691ee6dd861cc56e24
1+
configured_endpoints: 123
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik/x-twitter-scraper-323137ebb1ee9824cd9cfb63a325c0839deb81f17244e42e8154d6567e7af954.yml
3+
openapi_spec_hash: 48da9c2747c1e7c474dd514d39c28c49
4+
config_hash: dab26921eb273c16e5570c0485c9ac2c

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

3+
## 0.8.0 (2026-07-29)
4+
5+
Full Changelog: [v0.7.0...v0.8.0](https://github.com/Xquik-dev/x-twitter-scraper-php/compare/v0.7.0...v0.8.0)
6+
7+
### Features
8+
9+
* add OpenSSF Gold quality gates ([fda56c5](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/fda56c5a3e3b2f5b0005a7374705a0a962aab584))
10+
* **api:** api update ([7652676](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/7652676f9a82be0dfff3f00fbaa2dfc1710007bb))
11+
* **api:** api update ([05df78b](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/05df78b18c20b19b00d2d2737f8bccff37c2191b))
12+
* **api:** api update ([caea052](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/caea05264accc0211005799ca50dbac73df70b45))
13+
* **api:** api update ([65f8519](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/65f851931946da17c1d8c41873fc68e36d7a88d4))
14+
* **api:** api update ([103737b](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/103737bd4aa8809ac50637b94ddb26bce6358c9b))
15+
16+
17+
### Bug Fixes
18+
19+
* avoid unstable generator path tracing ([1755e16](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/1755e16e6ea7fdd0446a1eac97884bc5d60ccd6c))
20+
* isolate branch coverage collection ([3f1e5c5](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/3f1e5c565f4011c2f941dd4cdc60853a6f017107))
21+
* publish assets before immutable release ([#16](https://github.com/Xquik-dev/x-twitter-scraper-php/issues/16)) ([874c706](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/874c706cf948f94eec4c9b4eae8ed8f6f6d8fb17))
22+
* stabilize branch coverage runtime ([99db293](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/99db2933865163aec3510b6c4224a670ffd2d1ea))
23+
* use hardened coverage merger ([a906de5](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/a906de52321403dea7e77557be81d1ff7ef4ed52))
24+
25+
26+
### Chores
27+
28+
* add FUNDING.yml pointing to xquik.com ([0251ac6](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/0251ac619d5a046713ef91f9c99a14e4fb667c7c))
29+
* add per-file license evidence ([a1ac8ac](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/a1ac8ac6d7e85ff26f0480cf87e4897d6b9b1e7a))
30+
* improve PHP package metadata ([e4c398d](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/e4c398df407b425e5ec5b2b6a4379a522f9af8b6))
31+
* prepare v0.4.5 ([8f72f00](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/8f72f0089a7c6b261d038c7861b07ad80574e820))
32+
33+
34+
### Documentation
35+
36+
* add Contributor Covenant 2.1 Code of Conduct ([#2192](https://github.com/Xquik-dev/x-twitter-scraper-php/issues/2192)) ([9b5a580](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/9b5a580eb39c479709602e6be3dc9c83bdb57cef))
37+
* add DeepWiki badge ([05deaee](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/05deaee83f76ff3ae7f124ae1be90cbaa2d51240))
38+
* clarify repository discovery ([c533705](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/c5337050bca2786a7b1c1460950063832ffb93b2))
39+
* map common X data tasks ([#10](https://github.com/Xquik-dev/x-twitter-scraper-php/issues/10)) ([e89b0e7](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/e89b0e7c66f391bf1c1330f14bdf56b68a8d6316))
40+
341
## 0.7.0 (2026-07-25)
442

543
Full Changelog: [v0.6.1...v0.7.0](https://github.com/Xquik-dev/x-twitter-scraper-php/compare/v0.6.1...v0.7.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Install the package from Packagist with Composer:
5454
<!-- x-release-please-start-version -->
5555

5656
```sh
57-
composer require xquik/x-twitter-scraper:^0.7.0
57+
composer require xquik/x-twitter-scraper:^0.8.0
5858
```
5959

6060
<!-- x-release-please-end -->

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<testsuite name="default">
1818
<directory suffix=".php">./tests</directory>
1919
<exclude>./tests/mock-api-router.php</exclude>
20+
<exclude>./tests/Support</exclude>
2021
</testsuite>
2122
</testsuites>
2223
</phpunit>

src/Compose/ComposeCreateParams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use XTwitterScraper\Core\Contracts\BaseModel;
1818

1919
/**
20-
* Run one step of Xquik's three-step writing workflow. Compose returns questions and editorial rules. Refine returns goal-specific guidance. Score applies deterministic text checks. It does not predict reach or expose X ranking weights.
20+
* Run one step of Xquik's three-step writing workflow. Compose returns questions, editorial rules, and source-specific Radar recommendations. Refine returns goal-specific guidance. Score applies deterministic text checks. It does not predict reach or expose X ranking weights.
2121
*
2222
* @see XTwitterScraper\Services\ComposeService::create()
2323
*

src/Compose/ComposeNewResponse/ComposePrepareResult.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\ContentRule;
1212
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\EngagementMultiplier;
13+
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\RadarRecommendation;
1314
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\SavedStyle;
1415
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\ScorerWeight;
1516
use XTwitterScraper\Core\Attributes\Optional;
@@ -20,6 +21,7 @@
2021
/**
2122
* @phpstan-import-type ContentRuleShape from \XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\ContentRule
2223
* @phpstan-import-type EngagementMultiplierShape from \XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\EngagementMultiplier
24+
* @phpstan-import-type RadarRecommendationShape from \XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\RadarRecommendation
2325
* @phpstan-import-type ScorerWeightShape from \XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\ScorerWeight
2426
* @phpstan-import-type SavedStyleShape from \XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\SavedStyle
2527
*
@@ -30,6 +32,7 @@
3032
* followUpQuestions: list<string>,
3133
* intentURL: string,
3234
* nextStep: string,
35+
* radarRecommendations: list<RadarRecommendation|RadarRecommendationShape>,
3336
* scorerWeights: list<ScorerWeight|ScorerWeightShape>,
3437
* source: string,
3538
* topPenalties: list<string>,
@@ -78,6 +81,14 @@ final class ComposePrepareResult implements BaseModel
7881
#[Required]
7982
public string $nextStep;
8083

84+
/**
85+
* Sources and guidance for researching a fresh post angle.
86+
*
87+
* @var list<RadarRecommendation> $radarRecommendations
88+
*/
89+
#[Required(list: RadarRecommendation::class)]
90+
public array $radarRecommendations;
91+
8192
/**
8293
* Published signal names with unpublished weights as null.
8394
*
@@ -134,6 +145,7 @@ final class ComposePrepareResult implements BaseModel
134145
* followUpQuestions: ...,
135146
* intentURL: ...,
136147
* nextStep: ...,
148+
* radarRecommendations: ...,
137149
* scorerWeights: ...,
138150
* source: ...,
139151
* topPenalties: ...,
@@ -150,6 +162,7 @@ final class ComposePrepareResult implements BaseModel
150162
* ->withFollowUpQuestions(...)
151163
* ->withIntentURL(...)
152164
* ->withNextStep(...)
165+
* ->withRadarRecommendations(...)
153166
* ->withScorerWeights(...)
154167
* ->withSource(...)
155168
* ->withTopPenalties(...)
@@ -168,6 +181,7 @@ public function __construct()
168181
* @param list<ContentRule|ContentRuleShape> $contentRules
169182
* @param list<EngagementMultiplier|EngagementMultiplierShape> $engagementMultipliers
170183
* @param list<string> $followUpQuestions
184+
* @param list<RadarRecommendation|RadarRecommendationShape> $radarRecommendations
171185
* @param list<ScorerWeight|ScorerWeightShape> $scorerWeights
172186
* @param list<string> $topPenalties
173187
* @param list<SavedStyle|SavedStyleShape>|null $savedStyles
@@ -180,6 +194,7 @@ public static function with(
180194
array $followUpQuestions,
181195
string $intentURL,
182196
string $nextStep,
197+
array $radarRecommendations,
183198
array $scorerWeights,
184199
string $source,
185200
array $topPenalties,
@@ -195,6 +210,7 @@ public static function with(
195210
$self['followUpQuestions'] = $followUpQuestions;
196211
$self['intentURL'] = $intentURL;
197212
$self['nextStep'] = $nextStep;
213+
$self['radarRecommendations'] = $radarRecommendations;
198214
$self['scorerWeights'] = $scorerWeights;
199215
$self['source'] = $source;
200216
$self['topPenalties'] = $topPenalties;
@@ -274,6 +290,19 @@ public function withNextStep(string $nextStep): self
274290
return $self;
275291
}
276292

293+
/**
294+
* Sources and guidance for researching a fresh post angle.
295+
*
296+
* @param list<RadarRecommendation|RadarRecommendationShape> $radarRecommendations
297+
*/
298+
public function withRadarRecommendations(array $radarRecommendations): self
299+
{
300+
$self = clone $this;
301+
$self['radarRecommendations'] = $radarRecommendations;
302+
303+
return $self;
304+
}
305+
277306
/**
278307
* Published signal names with unpublished weights as null.
279308
*
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult;
6+
7+
use XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\RadarRecommendation\Source;
8+
use XTwitterScraper\Core\Attributes\Required;
9+
use XTwitterScraper\Core\Concerns\SdkModel;
10+
use XTwitterScraper\Core\Contracts\BaseModel;
11+
12+
/**
13+
* @phpstan-type RadarRecommendationShape = array{
14+
* endpoint: string,
15+
* guidance: string,
16+
* source: Source|value-of<Source>,
17+
* useFor: string,
18+
* }
19+
*/
20+
final class RadarRecommendation implements BaseModel
21+
{
22+
/** @use SdkModel<RadarRecommendationShape> */
23+
use SdkModel;
24+
25+
/**
26+
* Radar endpoint for this source.
27+
*/
28+
#[Required]
29+
public string $endpoint;
30+
31+
/**
32+
* Source-specific drafting guidance.
33+
*/
34+
#[Required]
35+
public string $guidance;
36+
37+
/** @var value-of<Source> $source */
38+
#[Required(enum: Source::class)]
39+
public string $source;
40+
41+
/**
42+
* Current-topic research this source supports.
43+
*/
44+
#[Required]
45+
public string $useFor;
46+
47+
/**
48+
* `new RadarRecommendation()` is missing required properties by the API.
49+
*
50+
* To enforce required parameters use
51+
* ```
52+
* RadarRecommendation::with(
53+
* endpoint: ..., guidance: ..., source: ..., useFor: ...
54+
* )
55+
* ```
56+
*
57+
* Otherwise ensure the following setters are called
58+
*
59+
* ```
60+
* (new RadarRecommendation)
61+
* ->withEndpoint(...)
62+
* ->withGuidance(...)
63+
* ->withSource(...)
64+
* ->withUseFor(...)
65+
* ```
66+
*/
67+
public function __construct()
68+
{
69+
$this->initialize();
70+
}
71+
72+
/**
73+
* Construct an instance from the required parameters.
74+
*
75+
* You must use named parameters to construct any parameters with a default value.
76+
*
77+
* @param Source|value-of<Source> $source
78+
*/
79+
public static function with(
80+
string $endpoint,
81+
string $guidance,
82+
Source|string $source,
83+
string $useFor
84+
): self {
85+
$self = new self;
86+
87+
$self['endpoint'] = $endpoint;
88+
$self['guidance'] = $guidance;
89+
$self['source'] = $source;
90+
$self['useFor'] = $useFor;
91+
92+
return $self;
93+
}
94+
95+
/**
96+
* Radar endpoint for this source.
97+
*/
98+
public function withEndpoint(string $endpoint): self
99+
{
100+
$self = clone $this;
101+
$self['endpoint'] = $endpoint;
102+
103+
return $self;
104+
}
105+
106+
/**
107+
* Source-specific drafting guidance.
108+
*/
109+
public function withGuidance(string $guidance): self
110+
{
111+
$self = clone $this;
112+
$self['guidance'] = $guidance;
113+
114+
return $self;
115+
}
116+
117+
/**
118+
* @param Source|value-of<Source> $source
119+
*/
120+
public function withSource(Source|string $source): self
121+
{
122+
$self = clone $this;
123+
$self['source'] = $source;
124+
125+
return $self;
126+
}
127+
128+
/**
129+
* Current-topic research this source supports.
130+
*/
131+
public function withUseFor(string $useFor): self
132+
{
133+
$self = clone $this;
134+
$self['useFor'] = $useFor;
135+
136+
return $self;
137+
}
138+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace XTwitterScraper\Compose\ComposeNewResponse\ComposePrepareResult\RadarRecommendation;
6+
7+
enum Source: string
8+
{
9+
case REDDIT = 'reddit';
10+
11+
case GITHUB = 'github';
12+
13+
case TRUSTMRR = 'trustmrr';
14+
15+
case HACKER_NEWS = 'hacker_news';
16+
17+
case GOOGLE_TRENDS = 'google_trends';
18+
19+
case WIKIPEDIA = 'wikipedia';
20+
21+
case POLYMARKET = 'polymarket';
22+
}

0 commit comments

Comments
 (0)