Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
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 @@
{
".": "2.10.0"
".": "2.11.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5dbe631ce516ca688273053ddcb58870561bd6dc76fa75df354c954d7af65a3c.yml
openapi_spec_hash: 53a74c4cccbdec8590db38183840a446
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b0c72d2fe5911c9ce155275b954198bf2152e915a7e5b9f719aad50e222b9ef8.yml
openapi_spec_hash: 5cf943ea5718059b7975417b012cee28
config_hash: 0fb0ceca5946298c416cec0cca5260c7
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2.11.0 (2026-08-18)

Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-go-sdk/compare/v2.10.0...v2.11.0)

### Features

* **api:** api update ([ba8f7e4](https://github.com/context-dot-dev/context-go-sdk/commit/ba8f7e4f992ec46bc2d279cbf1b5899852fe8382))
* **api:** api update ([0b8e3ed](https://github.com/context-dot-dev/context-go-sdk/commit/0b8e3ed35d100f2246c127c7f2fe7a4235ee90b2))
* **api:** api update ([8a66cc6](https://github.com/context-dot-dev/context-go-sdk/commit/8a66cc603ad04b2077a1ebdc7638c865ab68164b))

## 2.10.0 (2026-08-17)

Full Changelog: [v2.9.0...v2.10.0](https://github.com/context-dot-dev/context-go-sdk/compare/v2.9.0...v2.10.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/context-dot-dev/context-go-sdk@v2.10.0'
go get -u 'github.com/context-dot-dev/context-go-sdk@v2.11.0'
```

<!-- x-release-please-end -->
Expand Down
14 changes: 14 additions & 0 deletions brand.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,17 @@ type BrandGetResponseBrandColor struct {
Hex string `json:"hex"`
// Name of the color
Name string `json:"name"`
// Where the color was observed: 'site' colors come from the website's own theme
// signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
// logo image pixels.
//
// Any of "site", "logo".
Source string `json:"source"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Hex respjson.Field
Name respjson.Field
Source respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
Expand Down Expand Up @@ -780,10 +787,17 @@ type BrandGetSimplifiedResponseBrandColor struct {
Hex string `json:"hex"`
// Name of the color
Name string `json:"name"`
// Where the color was observed: 'site' colors come from the website's own theme
// signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
// logo image pixels.
//
// Any of "site", "logo".
Source string `json:"source"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Hex respjson.Field
Name respjson.Field
Source respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "2.10.0" // x-release-please-version
const PackageVersion = "2.11.0" // x-release-please-version
66 changes: 49 additions & 17 deletions news.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ func (r *NewsService) Search(ctx context.Context, body NewsSearchParams, opts ..
}

type NewsSearchResponse struct {
Data []NewsSearchResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
Meta NewsSearchResponseMeta `json:"meta" api:"required"`
NextCursor string `json:"next_cursor" api:"required"`
// Articles matching the search, in the requested order.
Data []NewsSearchResponseData `json:"data" api:"required"`
// True when more results are available beyond this page.
HasMore bool `json:"has_more" api:"required"`
// Summary information about this response.
Meta NewsSearchResponseMeta `json:"meta" api:"required"`
// Pass as cursor in the next request to fetch the following page. Null when there
// are no more results.
NextCursor string `json:"next_cursor" api:"required"`
// Metadata about the API key used for the request. Included in every response
// whenever a valid API key is provided, even when the response status is not 200.
KeyMetadata NewsSearchResponseKeyMetadata `json:"key_metadata"`
Expand All @@ -76,20 +81,37 @@ func (r *NewsSearchResponse) UnmarshalJSON(data []byte) error {
}

type NewsSearchResponseData struct {
ID string `json:"id" api:"required"`
Authors []string `json:"authors" api:"required"`
Description string `json:"description" api:"required"`
ImageURL string `json:"image_url" api:"required"`
Language string `json:"language" api:"required"`
Match NewsSearchResponseDataMatch `json:"match" api:"required"`
PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
Source NewsSearchResponseDataSource `json:"source" api:"required"`
// Groups matching normalized headlines published on the same UTC day.
// Stable unique identifier for this article. Use it to deduplicate or reference an
// article across requests.
ID string `json:"id" api:"required"`
// Bylined authors. Empty when no byline is available.
Authors []string `json:"authors" api:"required"`
// Short summary or excerpt of the article, when the publisher provides one.
Description string `json:"description" api:"required"`
// Lead image for the article, when one is available.
ImageURL string `json:"image_url" api:"required"`
// Language the article is written in, as a lowercase ISO 639-1 code such as en.
// Null when unknown.
Language string `json:"language" api:"required"`
// How the article relates to the company you searched for.
Match NewsSearchResponseDataMatch `json:"match" api:"required"`
// When the article was published, as an ISO 8601 timestamp. Null when the
// publisher does not state a reliable date.
PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
// The publication that published the article.
Source NewsSearchResponseDataSource `json:"source" api:"required"`
// Shared by articles covering the same story on the same day. Use it to group or
// collapse syndicated copies of one announcement across outlets.
StoryID string `json:"story_id" api:"required"`
Title string `json:"title" api:"required"`
// Article headline.
Title string `json:"title" api:"required"`
// Kind of coverage. Use it to separate independent reporting (editorial) from
// company-issued content (press_release, regulatory_filing, advisory).
//
// Any of "editorial", "press_release", "regulatory_filing", "advisory".
Type string `json:"type" api:"required"`
URL string `json:"url" api:"required" format:"uri"`
// Link to the article on the publisher site.
URL string `json:"url" api:"required" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Expand All @@ -115,8 +137,13 @@ func (r *NewsSearchResponseData) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// How the article relates to the company you searched for.
type NewsSearchResponseDataMatch struct {
// How confident the match is, from 0 to 1. Null when a score is unavailable.
Confidence float64 `json:"confidence" api:"required"`
// primary when the article is mainly about the company, secondary when the company
// is mentioned but is not the main subject.
//
// Any of "primary", "secondary".
Level string `json:"level" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
Expand All @@ -134,11 +161,14 @@ func (r *NewsSearchResponseDataMatch) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// The publication that published the article.
type NewsSearchResponseDataSource struct {
// True when Context observed this article in the publisher-owned feed.
Direct bool `json:"direct" api:"required"`
Direct bool `json:"direct" api:"required"`
// Website domain of the publication.
Domain string `json:"domain" api:"required"`
Name string `json:"name" api:"required"`
// Name of the publication, such as Reuters.
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Direct respjson.Field
Expand All @@ -155,7 +185,9 @@ func (r *NewsSearchResponseDataSource) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Summary information about this response.
type NewsSearchResponseMeta struct {
// Number of articles in this page.
Count int64 `json:"count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Expand Down
6 changes: 6 additions & 0 deletions web.go
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,12 @@ type WebScreenshotParams struct {
// the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
// omitted.
WaitForMs param.Opt[int64] `query:"waitForMs,omitzero" json:"-"`
// Optional parameter for comprehensive popup cleanup. If 'true', the browser
// dismisses detected cookie/consent UI and clears other detected obstructive
// popups and overlays before capture. If 'false' or not provided, this parameter
// requests no cleanup; handleCookiePopup can still request cookie/consent handling
// independently.
ClearPopups param.Opt[bool] `query:"clearPopups,omitzero" json:"-"`
// A specific URL to screenshot directly, bypassing domain resolution (e.g.,
// 'https://example.com/pricing'). When provided, the screenshot is taken of this
// exact URL. You must provide either 'domain' or 'directUrl', but not both.
Expand Down
1 change: 1 addition & 0 deletions web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func TestWebScreenshotWithOptionalParams(t *testing.T) {
option.WithAPIKey("My API Key"),
)
_, err := client.Web.Screenshot(context.TODO(), contextdev.WebScreenshotParams{
ClearPopups: contextdev.Bool(true),
ColorScheme: contextdev.WebScreenshotParamsColorSchemeLight,
Country: contextdev.WebScreenshotParamsCountryDe,
DirectURL: contextdev.String("https://example.com"),
Expand Down
Loading