Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0"
".": "0.4.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 115
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-93bb7d4f1475c8043af464ec88244a034456c549136c8477f284f0a33192e1c9.yml
openapi_spec_hash: 74dca63c872249274ad99b111dea0833
configured_endpoints: 102
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/xquik%2Fx-twitter-scraper-ec9b23603f987503f8837da5992b5db4c59a2bc627b090557539791a2b2b64a5.yml
openapi_spec_hash: faf6a6deaadba884a07e970fd05ac570
config_hash: 8894c96caeb6df84c9394518810221bd
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.4.0 (2026-04-08)

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

### Features

* **api:** api update ([6506668](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/6506668a137f1980463e203eb67cad113bb1fa44))
* **api:** api update ([9c2ff12](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/9c2ff129eeea121788eab5dba91cc23ebb8322c1))
* **api:** api update ([3250f4f](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/3250f4f365634efb85f205856a68d93315753894))
* **api:** api update ([3338eb1](https://github.com/Xquik-dev/x-twitter-scraper-php/commit/3338eb1343e1923fbcb212383ebcfa9afc2f4404))

## 0.3.0 (2026-04-01)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/Xquik-dev/x-twitter-scraper-php/compare/v0.2.0...v0.3.0)
Expand Down
2 changes: 2 additions & 0 deletions src/APIKeys/APIKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* API key metadata returned when listing keys.
*
* @phpstan-type APIKeyShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/APIKeys/APIKeyListResponse/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* API key metadata returned when listing keys.
*
* @phpstan-type KeyShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Drafts/Draft.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Saved tweet draft with optional topic and goal.
*
* @phpstan-type DraftShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Drafts/DraftDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Full tweet draft including update timestamp.
*
* @phpstan-type DraftDetailShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Drafts/DraftGetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Full tweet draft including update timestamp.
*
* @phpstan-type DraftGetResponseShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
6 changes: 6 additions & 0 deletions src/Drafts/DraftListParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ final class DraftListParams implements BaseModel
#[Optional]
public ?string $afterCursor;

/**
* Maximum number of items to return (1-100, default 50).
*/
#[Optional]
public ?int $limit;

Expand Down Expand Up @@ -66,6 +69,9 @@ public function withAfterCursor(string $afterCursor): self
return $self;
}

/**
* Maximum number of items to return (1-100, default 50).
*/
public function withLimit(int $limit): self
{
$self = clone $this;
Expand Down
2 changes: 2 additions & 0 deletions src/Drafts/DraftListResponse/Draft.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Saved tweet draft with optional topic and goal.
*
* @phpstan-type DraftShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Drafts/DraftNewResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Full tweet draft including update timestamp.
*
* @phpstan-type DraftNewResponseShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Full giveaway draw with tweet metrics, entries, and timing.
*
* @phpstan-type DrawDetailShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
8 changes: 7 additions & 1 deletion src/Draws/DrawExportParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ final class DrawExportParams implements BaseModel
use SdkModel;
use SdkParams;

/** @var value-of<Format>|null $format */
/**
* Export output format.
*
* @var value-of<Format>|null $format
*/
#[Optional(enum: Format::class)]
public ?string $format;

Expand Down Expand Up @@ -64,6 +68,8 @@ public static function with(
}

/**
* Export output format.
*
* @param Format|value-of<Format> $format
*/
public function withFormat(Format|string $format): self
Expand Down
3 changes: 3 additions & 0 deletions src/Draws/DrawExportParams/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace XTwitterScraper\Draws\DrawExportParams;

/**
* Export output format.
*/
enum Format: string
{
case CSV = 'csv';
Expand Down
5 changes: 5 additions & 0 deletions src/Draws/DrawGetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ final class DrawGetResponse implements BaseModel
/** @use SdkModel<DrawGetResponseShape> */
use SdkModel;

/**
* Full giveaway draw with tweet metrics, entries, and timing.
*/
#[Required]
public Draw $draw;

Expand Down Expand Up @@ -69,6 +72,8 @@ public static function with(Draw|array $draw, array $winners): self
}

/**
* Full giveaway draw with tweet metrics, entries, and timing.
*
* @param Draw|DrawShape $draw
*/
public function withDraw(Draw|array $draw): self
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawGetResponse/Draw.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Full giveaway draw with tweet metrics, entries, and timing.
*
* @phpstan-type DrawShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawGetResponse/Winner.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Giveaway draw winner with position and backup flag.
*
* @phpstan-type WinnerShape = array{
* authorUsername: string, isBackup: bool, position: int, tweetID: string
* }
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Giveaway draw summary with entry counts and status.
*
* @phpstan-type DrawListItemShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
10 changes: 8 additions & 2 deletions src/Draws/DrawListParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ final class DrawListParams implements BaseModel
use SdkParams;

/**
* Cursor for pagination.
* Cursor for keyset pagination.
*/
#[Optional]
public ?string $after;

/**
* Maximum number of items to return (1-100, default 50).
*/
#[Optional]
public ?int $limit;

Expand All @@ -52,7 +55,7 @@ public static function with(?string $after = null, ?int $limit = null): self
}

/**
* Cursor for pagination.
* Cursor for keyset pagination.
*/
public function withAfter(string $after): self
{
Expand All @@ -62,6 +65,9 @@ public function withAfter(string $after): self
return $self;
}

/**
* Maximum number of items to return (1-100, default 50).
*/
public function withLimit(int $limit): self
{
$self = clone $this;
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawListResponse/Draw.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Giveaway draw summary with entry counts and status.
*
* @phpstan-type DrawShape = array{
* id: string,
* createdAt: \DateTimeInterface,
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/DrawRunResponse/Winner.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Giveaway draw winner with position and backup flag.
*
* @phpstan-type WinnerShape = array{
* authorUsername: string, isBackup: bool, position: int, tweetID: string
* }
Expand Down
2 changes: 2 additions & 0 deletions src/Draws/Winner.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Giveaway draw winner with position and backup flag.
*
* @phpstan-type WinnerShape = array{
* authorUsername: string, isBackup: bool, position: int, tweetID: string
* }
Expand Down
2 changes: 2 additions & 0 deletions src/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use XTwitterScraper\Core\Contracts\BaseModel;

/**
* Error response containing a machine-readable error code.
*
* @phpstan-type ErrorShape = array{
* error: \XTwitterScraper\Error\Error|value-of<\XTwitterScraper\Error\Error>
* }
Expand Down
3 changes: 3 additions & 0 deletions src/EventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace XTwitterScraper;

/**
* Type of monitor event fired when account activity occurs.
*/
enum EventType: string
{
case TWEET_NEW = 'tweet.new';
Expand Down
10 changes: 9 additions & 1 deletion src/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use XTwitterScraper\Events\Event\Type;

/**
* Monitor event summary with type, username, and occurrence time.
*
* @phpstan-type EventShape = array{
* id: string,
* data: array<string,mixed>,
Expand Down Expand Up @@ -37,7 +39,11 @@ final class Event implements BaseModel
#[Required]
public \DateTimeInterface $occurredAt;

/** @var value-of<Type> $type */
/**
* Type of monitor event fired when account activity occurs.
*
* @var value-of<Type> $type
*/
#[Required(enum: Type::class)]
public string $type;

Expand Down Expand Up @@ -135,6 +141,8 @@ public function withOccurredAt(\DateTimeInterface $occurredAt): self
}

/**
* Type of monitor event fired when account activity occurs.
*
* @param Type|value-of<Type> $type
*/
public function withType(Type|string $type): self
Expand Down
3 changes: 3 additions & 0 deletions src/Events/Event/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace XTwitterScraper\Events\Event;

/**
* Type of monitor event fired when account activity occurs.
*/
enum Type: string
{
case TWEET_NEW = 'tweet.new';
Expand Down
10 changes: 9 additions & 1 deletion src/Events/EventDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use XTwitterScraper\Events\EventDetail\Type;

/**
* Full monitor event including payload data and optional X event ID.
*
* @phpstan-type EventDetailShape = array{
* id: string,
* data: array<string,mixed>,
Expand Down Expand Up @@ -43,7 +45,11 @@ final class EventDetail implements BaseModel
#[Required]
public \DateTimeInterface $occurredAt;

/** @var value-of<Type> $type */
/**
* Type of monitor event fired when account activity occurs.
*
* @var value-of<Type> $type
*/
#[Required(enum: Type::class)]
public string $type;

Expand Down Expand Up @@ -149,6 +155,8 @@ public function withOccurredAt(\DateTimeInterface $occurredAt): self
}

/**
* Type of monitor event fired when account activity occurs.
*
* @param Type|value-of<Type> $type
*/
public function withType(Type|string $type): self
Expand Down
3 changes: 3 additions & 0 deletions src/Events/EventDetail/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace XTwitterScraper\Events\EventDetail;

/**
* Type of monitor event fired when account activity occurs.
*/
enum Type: string
{
case TWEET_NEW = 'tweet.new';
Expand Down
10 changes: 9 additions & 1 deletion src/Events/EventGetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use XTwitterScraper\Events\EventGetResponse\Type;

/**
* Full monitor event including payload data and optional X event ID.
*
* @phpstan-type EventGetResponseShape = array{
* id: string,
* data: array<string,mixed>,
Expand Down Expand Up @@ -43,7 +45,11 @@ final class EventGetResponse implements BaseModel
#[Required]
public \DateTimeInterface $occurredAt;

/** @var value-of<Type> $type */
/**
* Type of monitor event fired when account activity occurs.
*
* @var value-of<Type> $type
*/
#[Required(enum: Type::class)]
public string $type;

Expand Down Expand Up @@ -149,6 +155,8 @@ public function withOccurredAt(\DateTimeInterface $occurredAt): self
}

/**
* Type of monitor event fired when account activity occurs.
*
* @param Type|value-of<Type> $type
*/
public function withType(Type|string $type): self
Expand Down
Loading